Class JDOMetaDataProperties
java.lang.Object
com.sun.jdo.api.persistence.enhancer.meta.JDOMetaDataProperties
This class parses properties containing meta data information
about classes. The syntax of the properties is the following:
- the keys in the properties file are fully qualified classnames or fully qualified fieldnames
- a fields is separated by a classname with a hash mark ('#') (e.g. "test.Test#test1")
- all classnames are given in a natural form (e.g. "java.lang.Integer", "java.lang.Integer[][]", "int", "test.Test$Test1")
-
property keys are classnames and fieldnames
(e.g. "test.Test=...", "test.Test#field1=...")
-
Classnames can have the following attributes:
- jdo:{persistent|transactional}
- super: <classname>
- access: {public|protected|package|private}
-
Fieldnames can have the following attributes:
- type:<type>
- access: {public|protected|package|private}
- jdo:{persistent|transactional|transient}
- annotation:{pk|dfg|mediated}
-
the names of the attributes can be ommitted: you can say
test.Test1#field1=jdo:persistent,type:java.lang.String,pk,...
or
test.Test1#field1=persistent,java.lang.String,pk,...
or
test.Test1#field1=jdo:persistent,java.lang.String,pk,...
-
in order to find fields of a class, a line for the class has to be
specified in the properties: To find the field
test.Test1#field, the keystest.Test1andtest.Test1#Fieldhave to be present.
-
Constructor Summary
ConstructorsConstructorDescriptionJDOMetaDataProperties(Properties props) Creates a new object with the given properties. -
Method Summary
Modifier and TypeMethodDescriptioncom.sun.jdo.api.persistence.enhancer.meta.JDOMetaDataProperties.JDOClassgetJDOClass(String classname) Get the information about the class with the given name.com.sun.jdo.api.persistence.enhancer.meta.JDOMetaDataProperties.JDOFieldgetJDOField(String fieldname, String classname) Gets the information about the specified field.String[]Gets all classnames in the properties.
-
Constructor Details
-
JDOMetaDataProperties
Creates a new object with the given properties.- Parameters:
props- The properties.- See Also:
-
-
Method Details
-
getJDOClass
public com.sun.jdo.api.persistence.enhancer.meta.JDOMetaDataProperties.JDOClass getJDOClass(String classname) throws JDOMetaDataUserException Get the information about the class with the given name.- Parameters:
classname- The classname.- Returns:
- The information about the class or
nullif no information is given. - Throws:
JDOMetaDataUserException- If something went wrong parsing the properties.
-
getJDOField
public com.sun.jdo.api.persistence.enhancer.meta.JDOMetaDataProperties.JDOField getJDOField(String fieldname, String classname) throws JDOMetaDataUserException Gets the information about the specified field.- Parameters:
fieldname- The name of the field of the class.classname- The name of the class.- Returns:
- The information about the field or
nullif no information could be found. - Throws:
JDOMetaDataUserException- If something went wrong parsing the properties.
-
getKnownClassNames
Gets all classnames in the properties.- Returns:
- All classnames in the properties.
-