annotation (2,765)


Java lib or app to convert CSV to XML file?

Java lib or app to convert CSV to XML file?

Closed. This question is off-topic.It is not currently accepting answers. Want to improve this question? Update the question so it's…


Java Annotations

What is the purpose of annotations in Java? I have this fuzzy idea of them as somewhere in between a comment and actual code. Do they affect the program at run time? What are their typical usages? Are…


Java Delegates?

Does the Java language have delegate features, similar to how C# has support for delegates?…


How to maintain Hibernate cache consistency running two Java applications?

Our design has one jvm that is a jboss/webapp(read/write) that is used to maintain the data via hibernate(using jpa) to the db. The model has 10-15 persistent classes with 3-5 levels of depth in th…


java - Bypass GeneratedValue in Hibernate

Is it possible to bypass @GeneratedValue for an ID in Hibernate, we have a case where, most of the time we want the ID to be set using GeneratedValue, but in certain cases would like to set the ID ma…


When do you use Java's @Override annotation and why?

What are the best practices for using Java's @Override annotation and why? It seems like it would be overkill to mark every single overridden method with the @Override annotation. Are there certa…



How do I force a Java subclass to define an Annotation?

If a class defined an annotation, is it somehow possible to force its subclass to define the same annotation? For instance, we have a simple class/subclass pair that share the @Author @interface. Wha…


Java Frameworks War: Spring and Hibernate

My developers are waging a civil war. In one camp, they've embraced Hibernate and Spring. In the other camp, they've denounced frameworks-they're considering Hibernate though. The question is: Are t…


Is static metaprogramming possible in Java?

I am a fan of static metaprogramming in C++. I know Java now has generics. Does this mean that static metaprogramming(i.e., compile-time program execution) is possible in Java? If so, can anyone…


Multiple Session Factories under Spring/Hibernate

I have been given a requirement where I need to support multiple databases in the same instance, to support multi-tenancy. Each DB has an identical schema. The user logs into a specific database by c…




example spring java annotations boot how not hibernate with custom