Cumulus4j API
(1.2.0-SNAPSHOT)

org.cumulus4j.store.model
Class EmbeddedFieldMeta

java.lang.Object
  extended by org.cumulus4j.store.model.FieldMeta
      extended by org.cumulus4j.store.model.EmbeddedFieldMeta
All Implemented Interfaces:
DetachCallback, StoreCallback

public class EmbeddedFieldMeta
extends FieldMeta


Nested Class Summary
 
Nested classes/interfaces inherited from class org.cumulus4j.store.model.FieldMeta
FieldMeta.NamedQueries
 
Field Summary
protected static String UNIQUE_SCOPE_PREFIX_EMBEDDED_FIELD_META
           
 
Fields inherited from class org.cumulus4j.store.model.FieldMeta
attachedFieldMetasInPostDetachThreadLocal, UNIQUE_SCOPE_FIELD_META
 
Constructor Summary
protected EmbeddedFieldMeta()
           
  EmbeddedFieldMeta(EmbeddedClassMeta classMeta, EmbeddedFieldMeta ownerFieldMeta, FieldMeta nonEmbeddedFieldMeta)
           
 
Method Summary
 void addSubFieldMeta(FieldMeta subFieldMeta)
           
 EmbeddedClassMeta getClassMeta()
          Get the ClassMeta to which this FieldMeta belongs.
 int getDataNucleusAbsoluteFieldNumber()
          Get the non-persistent field-number in DataNucleus' meta-data.
 int getDataNucleusAbsoluteFieldNumber(ExecutionContext executionContext)
           
 AbstractMemberMetaData getDataNucleusMemberMetaData(ExecutionContext executionContext)
           
 FieldMeta getEmbeddingFieldMeta()
          Get the field which is embedding the object having this field.
 FieldMeta getNonEmbeddedFieldMeta()
           
 void jdoPostDetach(Object o)
           
protected  void setClassMeta(ClassMeta classMeta)
           
 void setDataNucleusAbsoluteFieldNumber(int dataNucleusAbsoluteFieldNumber)
           
protected  void setNonEmbeddedFieldMetaPostponed(PostDetachRunnableManager postDetachRunnableManager, DetachedClassMetaModel detachedClassMetaModel, FieldMeta nonEmbeddedFieldMeta, int postponeCounter)
           
protected  void setOwnerFieldMeta(FieldMeta ownerFieldMeta)
           
 String toString()
           
 
Methods inherited from class org.cumulus4j.store.model.FieldMeta
equals, getEmbeddedClassMeta, getFieldID, getFieldName, getFieldOrElementType, getFieldOrElementTypeClassMeta, getFieldOrElementTypeDataNucleusClassMetaData, getMappedByFieldMeta, getOwnerFieldMeta, getPersistenceManager, getRole, getRole2SubFieldMeta, getSubFieldMeta, getSubFieldMetas, getUniqueScope, hashCode, jdoPreDetach, jdoPreStore, removeAllSubFieldMetasExcept, removeSubFieldMeta, setEmbeddedClassMeta, setUniqueScope
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

UNIQUE_SCOPE_PREFIX_EMBEDDED_FIELD_META

protected static final String UNIQUE_SCOPE_PREFIX_EMBEDDED_FIELD_META
Constructor Detail

EmbeddedFieldMeta

protected EmbeddedFieldMeta()

EmbeddedFieldMeta

public EmbeddedFieldMeta(EmbeddedClassMeta classMeta,
                         EmbeddedFieldMeta ownerFieldMeta,
                         FieldMeta nonEmbeddedFieldMeta)
Method Detail

getClassMeta

public EmbeddedClassMeta getClassMeta()
Description copied from class: FieldMeta
Get the ClassMeta to which this FieldMeta belongs. Every FieldMeta belongs to exactly one ClassMeta just like a field is declared in exactly one Java class. Note, that a FieldMeta might belong to another FieldMeta in order to reference sub-field-properties, e.g. a Map's key. In this case, the direct property classMeta is null, but this method still returns the correct ClassMeta by resolving it indirectly via the ownerFieldMeta.

Overrides:
getClassMeta in class FieldMeta
Returns:
the ClassMeta to which this instance of FieldMeta belongs.

addSubFieldMeta

public void addSubFieldMeta(FieldMeta subFieldMeta)
Overrides:
addSubFieldMeta in class FieldMeta

setClassMeta

protected void setClassMeta(ClassMeta classMeta)
Overrides:
setClassMeta in class FieldMeta

setOwnerFieldMeta

protected void setOwnerFieldMeta(FieldMeta ownerFieldMeta)
Overrides:
setOwnerFieldMeta in class FieldMeta

getNonEmbeddedFieldMeta

public FieldMeta getNonEmbeddedFieldMeta()

getEmbeddingFieldMeta

public FieldMeta getEmbeddingFieldMeta()
Get the field which is embedding the object having this field.

This is a convenience method for getClassMeta().getEmbeddingFieldMeta().

Returns:
the field which is embedding the object having this field. Never null.

jdoPostDetach

public void jdoPostDetach(Object o)
Specified by:
jdoPostDetach in interface DetachCallback
Overrides:
jdoPostDetach in class FieldMeta

setNonEmbeddedFieldMetaPostponed

protected void setNonEmbeddedFieldMetaPostponed(PostDetachRunnableManager postDetachRunnableManager,
                                                DetachedClassMetaModel detachedClassMetaModel,
                                                FieldMeta nonEmbeddedFieldMeta,
                                                int postponeCounter)

getDataNucleusAbsoluteFieldNumber

public int getDataNucleusAbsoluteFieldNumber(ExecutionContext executionContext)
Overrides:
getDataNucleusAbsoluteFieldNumber in class FieldMeta

getDataNucleusAbsoluteFieldNumber

public int getDataNucleusAbsoluteFieldNumber()
Description copied from class: FieldMeta
Get the non-persistent field-number in DataNucleus' meta-data. This is only a usable value, if this FieldMeta was obtained via Cumulus4jStoreManager#getClassMeta(org.datanucleus.store.ExecutionContext, Class); otherwise it is -1.

Overrides:
getDataNucleusAbsoluteFieldNumber in class FieldMeta
Returns:
the non-persistent field-number in DataNucleus' meta-data or -1.

setDataNucleusAbsoluteFieldNumber

public void setDataNucleusAbsoluteFieldNumber(int dataNucleusAbsoluteFieldNumber)
Overrides:
setDataNucleusAbsoluteFieldNumber in class FieldMeta

getDataNucleusMemberMetaData

public AbstractMemberMetaData getDataNucleusMemberMetaData(ExecutionContext executionContext)
Overrides:
getDataNucleusMemberMetaData in class FieldMeta

toString

public String toString()
Overrides:
toString in class FieldMeta

Cumulus4j API
(1.2.0-SNAPSHOT)

Copyright © 2013 NightLabs Consulting GmbH. All Rights Reserved.