Questions tagged [annotated-pojos]

Java Beans with Annotations generally useful for Object Relational Mapping

Annotations is the powerful way to provide the metadata for the Object and Relational Table mapping. All the metadata is clubbed into the POJO java file along with the code. This helps the user to understand the table structure and POJO simultaneously during the development.

8 questions
2
votes
1 answer

Where does xmlns:tns come from when using schemagen

We are using schemagen to create an XSD from some annotated POJOs. Here is our ant target
Paul Reiners
  • 8,576
  • 33
  • 117
  • 202
1
vote
1 answer

How to resolve this reflection error? java.lang.reflect.Field.get(Field.java:393)

I am trying to change the value of @ColumnTransformer at runtime so that I can store my encryption keys somewhere else on a server. How can I achieve this ? Below is my main code: List fields =…
1
vote
1 answer

@NotNull clarification for JSR-303 validation

I have a POJO annotated with JSR-303 annotations. Some of its attributes are other POJOs. I would like the inner POJOs to be @Valid, only if they are not null. But if they're null it's OK. Unfortunately I'm not succeding in doing this, so Java…
1
vote
1 answer

POJOs as documents in mongodb

I am trying to save entity as documents in Mongodb and tried to create Codec for it . And it does not seem to work . I tried Morphia but, i am not able to find documentation on adding extra fields into document at runtime using morphia. this would…
harsha kumar Reddy
  • 1,251
  • 1
  • 20
  • 32
1
vote
1 answer

Generating Hibernate Mapping Files and POJOs from Database with netbeans

I just reinstalled everything on my computer and had to setup Netbeans again. I've opened a hibernate project and I've just added 3 new tables to the database. I've attempted to map these files by using "Hibernate Mapping Files and POJOs from…
CaptainMorgan
  • 1,193
  • 2
  • 25
  • 55
0
votes
2 answers

Conditional naming of POJO classes

Our problem is, our service GET /services/v1/myobject returns object named Xyz. This representation is used by multiple existing clients. The new service GET /services/v2/myobject needs to expose exact same object but with different name, say…
Ajeet Ganga
  • 8,353
  • 10
  • 56
  • 79
0
votes
1 answer

Restrict input length using annotation in java POJO

I have a POJO class like below, @XmlRootElement public class JsonReply { @XmlElement(nillable = false) String callResult; @XmlElement(nillable=false) String returnobj; @NotNull String callError; public String getCallResult() { return…
-1
votes
2 answers

How to clear (remove) all annotations from a Java (EE) entity bean?

Is there a way to automatically (or with a one-click trigger to) remove all annotations from a class source code in whichever IDE? My specific requirement is to convert all entity beans into just un-annotated POJOs which will be used by plain JDBC…
fledglingCoder
  • 402
  • 9
  • 24