Class ValueMetaDataImpl

    • Constructor Detail

      • ValueMetaDataImpl

        protected ValueMetaDataImpl​(FieldMetaData owner)
      • ValueMetaDataImpl

        protected ValueMetaDataImpl()
        Constructor for serialization.
    • Method Detail

      • setType

        public void setType​(java.lang.Class type)
        Description copied from interface: ValueMetaData
        The value class.
        Specified by:
        setType in interface ValueMetaData
      • setTypeCode

        public void setTypeCode​(int code)
        Description copied from interface: ValueMetaData
        The type code of the value class.
        Specified by:
        setTypeCode in interface ValueMetaData
      • isTypePC

        public boolean isTypePC()
        Description copied from interface: ValueMetaData
        Whether the type is a persistence capable instance.
        Specified by:
        isTypePC in interface ValueMetaData
      • getDeclaredType

        public java.lang.Class getDeclaredType()
        Description copied from interface: ValueMetaData
        Return the declared class of the value. This can differ from the return value of ValueMetaData.getType() if the user indicates a different type or the value has an externalizer.
        Specified by:
        getDeclaredType in interface ValueMetaData
      • setDeclaredType

        public void setDeclaredType​(java.lang.Class type)
        Description copied from interface: ValueMetaData
        Set the declared class of the value.
        Specified by:
        setDeclaredType in interface ValueMetaData
      • setDeclaredTypeCode

        public void setDeclaredTypeCode​(int code)
        Description copied from interface: ValueMetaData
        Set the type code for the value. The type code is usually computed automatically, but it can be useful to set it explicitly when creating metadatas from scratch.
        Specified by:
        setDeclaredTypeCode in interface ValueMetaData
      • isDeclaredTypePC

        public boolean isDeclaredTypePC()
        Description copied from interface: ValueMetaData
        Whether the type is a persistence capable instance.
        Specified by:
        isDeclaredTypePC in interface ValueMetaData
      • isEmbedded

        public boolean isEmbedded()
        Description copied from interface: ValueMetaData
        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. Defaults to true if the field is not a collection or map or persistence-capable object; defaults to false otherwise. Implementations are permitted to ignore this attribute.
        Specified by:
        isEmbedded in interface ValueMetaData
      • setEmbedded

        public void setEmbedded​(boolean embedded)
        Description copied from interface: ValueMetaData
        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. Defaults to true if the field is not a collection or map or persistence-capable objects; defaults to false otherwise. Implementations are permitted to ignore this attribute.
        Specified by:
        setEmbedded in interface ValueMetaData
      • isEmbeddedPC

        public boolean isEmbeddedPC()
        Description copied from interface: ValueMetaData
        Whether this is an embedded persistence capable value.
        Specified by:
        isEmbeddedPC in interface ValueMetaData
      • getCascadeDelete

        public int getCascadeDelete()
        Description copied from interface: ValueMetaData
        Cascade behavior for delete operation. Only applies to persistence-capable values. Options are:
        • 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.
        Specified by:
        getCascadeDelete in interface ValueMetaData
      • getCascadePersist

        public int getCascadePersist()
        Description copied from interface: ValueMetaData
        Cascade behavior for persist operation. Only applies to persistence-capable values. Options are:
        • 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.
        Specified by:
        getCascadePersist in interface ValueMetaData
      • getCascadeAttach

        public int getCascadeAttach()
        Description copied from interface: ValueMetaData
        Cascade behavior for attach operation. Only applies to persistence-capable values. Options are:
        • CASCADE_NONE: No cascades of attach. Relation remains detached.
        • CASCADE_IMMEDIATE: Value is attached immediately.
        Specified by:
        getCascadeAttach in interface ValueMetaData
      • getCascadeDetach

        public int getCascadeDetach()
        Description copied from interface: ValueMetaData
        Cascade behavior for detach operation. Only applies to persistence-capable values. Options are:
        • CASCADE_NONE: No cascades of detach. Relation remains attached.
        • CASCADE_IMMEDIATE: Value is detached immediately.
        Specified by:
        getCascadeDetach in interface ValueMetaData
      • getCascadeRefresh

        public int getCascadeRefresh()
        Description copied from interface: ValueMetaData
        Cascade behavior for refresh operation. Only applies to persistence-capable values. Options are:
        • 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.
        Specified by:
        getCascadeRefresh in interface ValueMetaData
      • isSerialized

        public boolean isSerialized()
        Description copied from interface: ValueMetaData
        Whether this value is serialized when stored.
        Specified by:
        isSerialized in interface ValueMetaData
      • setSerialized

        public void setSerialized​(boolean serialized)
        Description copied from interface: ValueMetaData
        Whether this value is serialized when stored.
        Specified by:
        setSerialized in interface ValueMetaData
      • getValueMappedBy

        public java.lang.String getValueMappedBy()
        Description copied from interface: ValueMetaData
        The field that this value shares a mapping with. Currently the only supported use for a mapped-by value is when a map field key is determined by a field of the persistence-capable map value.
        Specified by:
        getValueMappedBy in interface ValueMetaData
      • setValueMappedBy

        public void setValueMappedBy​(java.lang.String mapped)
        Description copied from interface: ValueMetaData
        The field that this value shares a mapping with. Currently the only supported use for a mapped-by value is when a map field key is determined by a field of the persistence-capable map value.
        Specified by:
        setValueMappedBy in interface ValueMetaData
      • getValueMappedByMetaData

        public FieldMetaData getValueMappedByMetaData()
        Description copied from interface: ValueMetaData
        The field that this value shares a mapping with. Currently the only supported use for a mapped-by value is when a map field key is determined by a field of the persistence-capable map value.
        Specified by:
        getValueMappedByMetaData in interface ValueMetaData
      • getTypeOverride

        public java.lang.Class getTypeOverride()
        Description copied from interface: ValueMetaData
        User-supplied type overriding assumed type based on field.
        Specified by:
        getTypeOverride in interface ValueMetaData
      • setTypeOverride

        public void setTypeOverride​(java.lang.Class val)
        Description copied from interface: ValueMetaData
        User-supplied type overriding assumed type based on field.
        Specified by:
        setTypeOverride in interface ValueMetaData
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • setResolve

        public void setResolve​(int mode)
        Description copied from interface: ValueMetaData
        Resolve mode for metadata.
        Specified by:
        setResolve in interface ValueMetaData
      • setResolve

        public void setResolve​(int mode,
                               boolean on)
        Description copied from interface: ValueMetaData
        Resolve mode for metadata.
        Specified by:
        setResolve in interface ValueMetaData
      • resolve

        public boolean resolve​(int mode)
        Description copied from interface: ValueMetaData
        Resolve and validate metadata. Return true if already resolved.
        Specified by:
        resolve in interface ValueMetaData
      • copy

        public void copy​(ValueMetaData vmd)
        Description copied from interface: ValueMetaData
        Copy state from the given value to this one. Do not copy mapping information.
        Specified by:
        copy in interface ValueMetaData