Is it possible to use a map with a non-entity class in JPA? If yes, how should it be annotated correctly?
@Entity
class A {
@HowShouldIAnnotateThis?
private Map<B, Integer> myMap = new HashMap<B, Integer>();
}
@Entity
class B {
...
}
...
This seems to be a question where the answer is implicit, hence I can't find anything explicit.
Does Google Web Toolkit only support custom layout managers, or a sub-set of the Java layout managers?
For example, is it possible to take a Java Swing application using GroupLayout and get it to work with GWT?
...
How should I use EclipseLink's @BasicMap annotation for a map whose key value is an entity and the value is an Integer?
@Entity
class A {
// This doesn't work, as the key is an entity
@BasicMap
private Map<B, Integer> myMap = new HashMap<B, Integer>();
}
@Entity
class B {
...
}
...
Is there a framework for synchronizing properties of POJOs? For example, I want to express (in some high-level, declarative form) that foo.text = bar.text + baz.text or foo.y = (max(bars, y)).y without having to register property change, element add and remove listeners on values and (especially) collections, which are repetitive and err...
Is there a way to set heap size from a running Java program?
...
Hi,
I'm trying to understand Emma the code coverage tool and it seems ok till the moment I need the metadata, for example which line exactly is left out or is covered. I need this information for my own application but can't get to it. The xml report doesn't provide it.
I would be thankful if anybody can help.
...
Hi, I have a Java class B with an inner class C. Some methods of B accept an instance of C as parameter but I only want to accept C instances created by the proper instance of B. Is there a way to do this validation at compile time?
Example
C c1 = new C();
B foo = c1.getB(); // foo was created by instance c1
C c2 = new C();
c2.method...
Hello every thanks for supporting me for my last question
Form getting submitted even A4j validation fails +jsf it is working
i have selectonemenu for country list
if the user is selecting country other than india he will directly enter state in textbox
but if he selects india another selectonemenu appears.
but on selecting value fro...
I know that BEA was working on LiquidVM which didn't require an underlying operating system, but would like to know if anyone in the open source community is working on something similar.
Ideally I would like to find an implementation where the VM is directly loaded by the OS boot loader.
...
If I have an instance of an inner class, how can I access the outer class from code that is not in the inner class? I know that within the inner class, I can use Outer.this to get the outer class, but I can't find any external way of getting this.
For example:
public class Outer {
public static void foo(Inner inner) {
//Question...
I am interested in studying license management patterns and coding techniques in detail.
...
Does this vary by vendor? by operating system? other factors?
...
I'm trying to create 5 Jlabels using netbeans GUI Design, the Labels are supposed to display 5 different values.
I need to combine these 5 JLabels in 1 array of Labels. is there any options in the design that let me do that?
...
In Eclipse you can configure numerous servers to run inside the IDE, including Tomcat. Depending on your Tomcat configuration, at some point in the life cycle of a webapp your JSP files will get compiled into servlets. These new servlet .class files are stored in the %TOMCAT_HOME%/work directory along with the .java intermediate file cre...
Consider having an application using DataNucleus with the following persistence structure:
You have a class that has two attributes like created (Date) and lastUpdate (Date): How do you automatically fill those attributes with the appropriate values when an object of this class is going to be committed?
Appropriate values would be sett...
I have created a java letter game applet using netbeans 6.0 which also has a Microsoft Access Database for the High Scores.
I want to upload it into a webpage (like how its done on miniclip facebook etc) I'd like to know how it could be done
...
Hi all
I'm at university, and we were taught to use notepad to programme java to start with. I moved onto notepad++ and quickly onto eclipse.
In notepad++, i could roll up (plus minus sign) if statements or for loop as well as methods and classes. I wondered if there is a plugin for eclipse that allows me to do the same?
Also, are there...
Are there any Java code generation persistence frameworks?
Something that is "database first" rather than object model first?
I know this is probably heresy in the Java world, I'd just like to know if any frameworks like this exist.
I'm more of a .NET guy these days. So on the .NET-side tools like .NET Tiers or CSLA come to mind.
...
I created a java project and then tried to import Java source code from two different projects. I've been working on it for a few hours, deleting and re-creating the project dozens of times to try to reconcile all of the messed up references between these two projects - which other people say are supposed to work together reliably.
What...
What benefits does Groovy offer over the use of Java other than more complicated syntax?
...