EntityMetadataBuilder¶
-
public interface
EntityMetadataBuilder
¶ The
EntityMetadataBuilderImpl
class is responsible for building jdo metadata for an entity class.
Methods¶
addBaseMetadata¶
-
void
addBaseMetadata
(JDOMetadata jdoMetadata, ClassData classData, EntityType entityType, Class<?> definition)¶ Adds base information about package and class name to a
javax.jdo.metadata.JDOMetadata
instance.Parameters: - jdoMetadata – an empty instance of
javax.jdo.metadata.JDOMetadata
. - classData – an instance of
org.motechproject.mds.domain.ClassData
- entityType – type of the entity(regular, history or trash)
- definition – the definition of the parent class
- jdoMetadata – an empty instance of
addEntityMetadata¶
-
void
addEntityMetadata
(JDOMetadata jdoMetadata, Entity entity, Class<?> definition)¶ Adds information about package and class name to a
javax.jdo.metadata.JDOMetadata
instance.Parameters: - jdoMetadata – a empty instance of
javax.jdo.metadata.JDOMetadata
. - entity – a instance of
org.motechproject.mds.domain.Entity
- definition – the definition of the class
- jdoMetadata – a empty instance of
addHelperClassMetadata¶
-
void
addHelperClassMetadata
(JDOMetadata jdoMetadata, ClassData classData, Entity entity, EntityType entityType, Class<?> definition)¶ Creates metadata with basic information about package and class name to the
javax.jdo.metadata.JDOMetadata
instance. Additionally, fetches fields from passed entities and adds metadata for fields, if it’s necessary. If entity is null, it will work just likeaddBaseMetadata(JDOMetadata, ClassData)
and won’t add any metadata for fields.Parameters: - jdoMetadata – an empty instance of
javax.jdo.metadata.JDOMetadata
. - classData – an instance of
org.motechproject.mds.domain.ClassData
- entity – an entity to fetch fields from
- entityType – type of the entity(history or trash)
- definition – the definition of the parent class
- jdoMetadata – an empty instance of
fixEnhancerIssuesInMetadata¶
-
void
fixEnhancerIssuesInMetadata
(JDOMetadata jdoMetadata)¶ This updates the metadata after enhancement. Nucleus makes some “corrections” which do not work with the runtime enhancer.