I have a base class that all of my domain classes extend, for example:
class Customer extends IbidemBaseDomain {
. .
}
Is there any way within my base class to determine what class is extending it. So in this example, is there anyway for IbidemBaseDomain to know that it's being extended by Customer?
...
Hi,
I'm looking for a feature or software, who will allow me to easily profile my method execution time. And choose what to profile by package filter.
I know, it's profiler 101.
I use the TPTP profiler. But i'm not happy with it. To be franck, i just dont understand how it's work, and when i profiling my application ( launch the serve...
(new rewritten code).. I just know that "b" will always the last box that i created.So i can't use b as the equals in actionPerformed. How to include all the buttons? Anyone can help me with this?
import java.awt.;
import javax.swing.;
import java.awt.event.*;
public class Lat1 extends JFrame implements ActionListener
{
...
Hi!
I have a Jasper Report and I want to create for this report a cover page.
The cover page must contain some information coming from the DB, like Company name, etc.
I am trying to do this using a subreport but I didn't succeed.
I've created a main report which contains first the cover page as a subreport and then
the whole report as a...
Hello!
Is it possible to implement own exception handling for exceptions that are thrown when the report is generated?
I want to supress the printing of error messages at the end of the report and instead show an alternate text at the section of the report which has caused the exception.
Thanks
(Using the RCP - Designer V. 2.1.3)
...
I have a query which returns a list of objects like such:
select distinct ref from references where [...]
I'd like to order these by a field not on ref but on an association of ref, i.e.:
select distinct ref from references where [...] order by ref.foo.name
Unfortunately this doesn't work in Oracle (once the query is translated to ...
Hi,
I want to know what is the use of .properties file and where it is used? Currently i am doing dynamic web application with ANT and i have to use .properties file and have to set a property inside build.xml file. So please gimme ideas regarding this
Regards,
Jeya
...
Hi.
How can I implement image acquisition from hardware scanner in Windows? I found JTwain library, but it's commercial. Is there any free frameworks? Any information about this?
...
According to the class ElementType in the API, you can annotate local variables and method parameters.
How is that done?
...
In the majority of cases I see Log instances declared as follows:
public static final Log LOG = LogFactory.getLog(MyClass.class);
I assume this means that the log configuration is loaded when the MyClass is loaded and is therefore set in stone until the MyClass is either reloaded or the JVM restarted?
So, if this assumption is correc...
I code in Python a lot, and I frequently create classes. Now, I'm not sure if this is good Python form, but I just declare a class in the same file as my main().
class foo {
...
}
I'm wondering if it's good form in Java to do the same?
For example,
class foo {
public static int name;
public static int numPoints;
public s...
I'm trying to move the menu structure from a JMenu into a JMenuBar. The above code shows different menus depending on TEST. For TEST==1 i expect aa bb in the menu bar, but only aa is shown ? The code shows the problem, it is not my real code ....
public class Test {
public static void main(String[] args) {
int TEST = 1; /...
I have a persistent class Author with two fields: int id, String name.
Problem is that whenever I execute query this way:
Session s = HibernateUtil.getSessionFactory().getCurrentSession();
s.beginTransaction();
Query q = s.createQuery("from Author");
return (Author)q.list().get(0);
It works fine and returns me an Author object with ...
Currently using the HTTPServletRequest class and specifically the .getQueryString method to retrieve an inputted URL.
The URL it will parse is say server/package/servlet?args1/args2/arg3..
I'd like to remove the question mark (?) from the URL however I have no idea how you would accomplish this. I'd just like to replace it with a forw...
I have a commons-logging configuration question.
I want it to use SimpleLog (instead of java.util.logging) and log all messages with level >= debug (instead of info).
...
I'd like to use spring support for sending mails. My project is built with maven-2 and I use spring-core 2.5.5 I tried to look in maven central repo for artifact to include in my pom.xml, and the only one I found is spring support. The problem is that the highest version in repo is 2.0.8 and it depends on spring-core v. 2.0.8. Should I ...
I know some of the escape characters in Java, e.g.
\n : Newline
\r : Carriage return
\t : Tab
\\ : Backslash
...
Is there a complete list somewhere?
...
I have a method that looks like this:
public static String escape(String text)
{
String r = replace(text, "\\", "\\\\");
r = replace(r, "\r", "\\r");
r = replace(r, "\b", "\\b");
r = replace(r, "\t", "\\t");
r = replace(r, "\n", "\\n");
r = replace(r, "\f", "\\f");
return r;
}
Is there a faster, less brutal way to...
Hello,
Does anybody know how to remove a line from a textfile.
I'm looking for something else than u read and write line by line and skip the line you want te remove.
For exemple: My File count 1346 lines and I want to remove line 520.
Thanks,
Martijn
...
So, I'm trying to get a video to play from an HTTP url. To do this, I'm using a URL object, and then openStream on it, like so:
URL url = new URL("http://good-3gp-videos.com/viapic/e39903da6e5c1e1c5d572a49a88a99e6.3gp");
player = Manager.createPlayer(url.openStream(), null);
However, there is a problem. When I try to import ...