|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ValueMetaData
Holds metadata on a value; this could be a field value, key value, or element value.
Field Summary | |
---|---|
static int |
CASCADE_AUTO
Use automatic cascade behavior. |
static int |
CASCADE_IMMEDIATE
The operation is immediately cascaded to this field. |
static int |
CASCADE_NONE
The operation is not cascaded to this field. |
static String |
MAPPED_BY_PK
Marker to set on setValueMappedBy(java.lang.String) to denote that the map key
is mapped by the primary key field of the value. |
Fields inherited from interface org.apache.openjpa.meta.MetaDataModes |
---|
MODE_MAPPING, MODE_MAPPING_INIT, MODE_META, MODE_NONE, MODE_QUERY |
Method Summary | |
---|---|
ClassMetaData |
addEmbeddedMetaData()
Add embedded metadata for this value. |
void |
copy(ValueMetaData vmd)
Copy state from the given value to this one. |
int |
getCascadeAttach()
Cascade behavior for attach operation. |
int |
getCascadeDelete()
Cascade behavior for delete operation. |
int |
getCascadePersist()
Cascade behavior for persist operation. |
int |
getCascadeRefresh()
Cascade behavior for refresh operation. |
Class |
getDeclaredType()
Return the declared class of the value. |
int |
getDeclaredTypeCode()
Return the declared type code of the value. |
ClassMetaData |
getDeclaredTypeMetaData()
Return metadata for the value's class, if the type is persistent. |
ClassMetaData |
getEmbeddedMetaData()
The embedded class metadata for the value. |
FieldMetaData |
getFieldMetaData()
Return the owning field for this value. |
int |
getResolve()
Resolve mode for metadata. |
Class |
getType()
The value class. |
int |
getTypeCode()
The type code of the value class. |
ClassMetaData |
getTypeMetaData()
The metadata for the value class, if the type is persistent. |
Class |
getTypeOverride()
User-supplied type overriding assumed type based on field. |
String |
getValueMappedBy()
The field that this value shares a mapping with. |
FieldMetaData |
getValueMappedByMetaData()
The field that this value shares a mapping with. |
boolean |
isDeclaredTypePC()
Whether the type is a persistence capable instance. |
boolean |
isEmbedded()
This attribute is a hint to the implementation to store this value in the same structure as the class, rather than as a separate datastore structure. |
boolean |
isEmbeddedPC()
Whether this is an embedded persistence capable value. |
boolean |
isSerialized()
Whether this value is serialized when stored. |
boolean |
isTypePC()
Whether the type is a persistence capable instance. |
boolean |
resolve(int mode)
Resolve and validate metadata. |
void |
setCascadeAttach(int cascade)
Cascade behavior for attach operation. |
void |
setCascadeDelete(int cascade)
Cascade behavior for deletion. |
void |
setCascadePersist(int cascade)
Cascade behavior for persist operation. |
void |
setCascadeRefresh(int cascade)
Cascade behavior for refresh operation. |
void |
setDeclaredType(Class type)
Set the declared class of the value. |
void |
setDeclaredTypeCode(int type)
Set the type code for the value. |
void |
setEmbedded(boolean embedded)
This attribute is a hint to the implementation to store this value in the same structure as the class, rather than as a separate datastore structure. |
void |
setResolve(int mode)
Resolve mode for metadata. |
void |
setResolve(int mode,
boolean on)
Resolve mode for metadata. |
void |
setSerialized(boolean serialized)
Whether this value is serialized when stored. |
void |
setType(Class type)
The value class. |
void |
setTypeCode(int code)
The type code of the value class. |
void |
setTypeOverride(Class type)
User-supplied type overriding assumed type based on field. |
void |
setValueMappedBy(String mapped)
The field that this value shares a mapping with. |
Methods inherited from interface org.apache.openjpa.meta.MetaDataContext |
---|
getRepository |
Field Detail |
---|
static final int CASCADE_NONE
static final int CASCADE_IMMEDIATE
static final int CASCADE_AUTO
static final String MAPPED_BY_PK
setValueMappedBy(java.lang.String)
to denote that the map key
is mapped by the primary key field of the value.
Method Detail |
---|
FieldMetaData getFieldMetaData()
Class getType()
void setType(Class type)
int getTypeCode()
void setTypeCode(int code)
boolean isTypePC()
ClassMetaData getTypeMetaData()
Class getDeclaredType()
getType()
if the user indicates
a different type or the value has an externalizer.
void setDeclaredType(Class type)
int getDeclaredTypeCode()
getTypeCode()
if the user indicates
a different type or the value has an externalizer.
void setDeclaredTypeCode(int type)
boolean isDeclaredTypePC()
ClassMetaData getDeclaredTypeMetaData()
boolean isEmbedded()
void setEmbedded(boolean embedded)
boolean isEmbeddedPC()
ClassMetaData getEmbeddedMetaData()
ClassMetaData addEmbeddedMetaData()
int getCascadeDelete()
CASCADE_NONE
: No cascades.CASCADE_IMMEDIATE
: Value is deleted immediately when
the owning object is deleted.CASCADE_AUTO
: Value will be deleted on flush
if the owning object is deleted or if the value is removed from the
owning object, and if the value is not assigned to another relation in
the same transaction.
void setCascadeDelete(int cascade)
getCascadeDelete()
int getCascadePersist()
CASCADE_NONE
: No cascades. If a transient relation
is held at flush, an error is thrown.CASCADE_IMMEDIATE
: Value is persisted immediately when
the owning object is persisted.CASCADE_AUTO
: Value will be persisted on flush.
void setCascadePersist(int cascade)
getCascadePersist()
int getCascadeAttach()
CASCADE_NONE
: No cascades of attach. Relation
remains detached.CASCADE_IMMEDIATE
: Value is attached immediately.
void setCascadeAttach(int cascade)
getCascadeAttach()
int getCascadeRefresh()
CASCADE_NONE
: No cascades of refresh.CASCADE_IMMEDIATE
: Persistent value object is also
refreshed.CASCADE_AUTO
: Value will be refreshed if it is
in the current fetch groups.
void setCascadeRefresh(int cascade)
getCascadeRefresh()
boolean isSerialized()
void setSerialized(boolean serialized)
String getValueMappedBy()
void setValueMappedBy(String mapped)
FieldMetaData getValueMappedByMetaData()
Class getTypeOverride()
void setTypeOverride(Class type)
int getResolve()
void setResolve(int mode)
void setResolve(int mode, boolean on)
boolean resolve(int mode)
void copy(ValueMetaData vmd)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |