Interface SerializedObjectPolicy

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      SerializedObjectPolicy clone()  
      java.util.List<org.eclipse.persistence.internal.helper.DatabaseField> getAllSelectionFields()
      Lists the database fields that should be read by the query using the policy, in case all inherited objects are read using outer joining.
      ClassDescriptor getDescriptor()
      get owning descriptor
      org.eclipse.persistence.internal.helper.DatabaseField getField()
      get the field that stores sopObject in the database (sopField)
      java.lang.Object getObjectFromRow​(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, org.eclipse.persistence.internal.sessions.AbstractSession session, ObjectLevelReadQuery query)
      Deserialize the object from the value corresponding to the policy field, nullify that value, set the object into the row using setSopObject, also return it.
      java.util.List<org.eclipse.persistence.internal.helper.DatabaseField> getSelectionFields()
      Lists the database fields that should be read by the query using the policy.
      void initialize​(org.eclipse.persistence.internal.sessions.AbstractSession session)
      initialize the policy
      void initializeField​(org.eclipse.persistence.internal.sessions.AbstractSession session)
      unless the field is already initialized by parent descriptor, add the field to the owning descriptor and set field's type
      SerializedObjectPolicy instantiateChild()
      instantiate policy for child descriptor
      void postInitialize​(org.eclipse.persistence.internal.sessions.AbstractSession session)
      postinitialize the policy: determine which mappings are included, which fields should be selected
      void putObjectIntoRow​(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractSession session)
      Serialize the object and put the result into the row as a value corresponding to the policy field
      void setDescriptor​(ClassDescriptor descriptor)
      set owning descriptor
      void setField​(org.eclipse.persistence.internal.helper.DatabaseField field)
      set the field that stores sopObject in the database (sopField)
    • Method Detail

      • setDescriptor

        void setDescriptor​(ClassDescriptor descriptor)
        set owning descriptor
      • getField

        org.eclipse.persistence.internal.helper.DatabaseField getField()
        get the field that stores sopObject in the database (sopField)
      • setField

        void setField​(org.eclipse.persistence.internal.helper.DatabaseField field)
        set the field that stores sopObject in the database (sopField)
      • initializeField

        void initializeField​(org.eclipse.persistence.internal.sessions.AbstractSession session)
        unless the field is already initialized by parent descriptor, add the field to the owning descriptor and set field's type
      • initialize

        void initialize​(org.eclipse.persistence.internal.sessions.AbstractSession session)
        initialize the policy
      • postInitialize

        void postInitialize​(org.eclipse.persistence.internal.sessions.AbstractSession session)
        postinitialize the policy: determine which mappings are included, which fields should be selected
      • getSelectionFields

        java.util.List<org.eclipse.persistence.internal.helper.DatabaseField> getSelectionFields()
        Lists the database fields that should be read by the query using the policy. To allow recovery in case of null or invalid sopObject, then this method should return all the fields define by descriptor (descriptor.getFields()).
      • getAllSelectionFields

        java.util.List<org.eclipse.persistence.internal.helper.DatabaseField> getAllSelectionFields()
        Lists the database fields that should be read by the query using the policy, in case all inherited objects are read using outer joining. To allow recovery in case of null or invalid sopObject, then this method should return all the fields define by descriptor (descriptor.getAllFields()).
      • putObjectIntoRow

        void putObjectIntoRow​(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow,
                              java.lang.Object object,
                              org.eclipse.persistence.internal.sessions.AbstractSession session)
        Serialize the object and put the result into the row as a value corresponding to the policy field
      • getObjectFromRow

        java.lang.Object getObjectFromRow​(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow,
                                          org.eclipse.persistence.internal.sessions.AbstractSession session,
                                          ObjectLevelReadQuery query)
        Deserialize the object from the value corresponding to the policy field, nullify that value, set the object into the row using setSopObject, also return it. If the object is null or invalid, behaviour depend on whether the policy allows the query to recover or not (see comments to getFieldsToSelect and getAllFieldsToSelect methods): if recovery is possible then the method should return null, otherwise throw QueryException (query is a parameter of this method only because it's required by QueryException).