Class SerializedObjectPolicyWrapper

    • Field Detail

      • serializedObjectPolicyClassName

        protected String serializedObjectPolicyClassName
    • Constructor Detail

      • SerializedObjectPolicyWrapper

        public SerializedObjectPolicyWrapper​(String serializedObjectPolicyClassName)
    • Method Detail

      • getSerializedObjectPolicyClassName

        public String getSerializedObjectPolicyClassName()
      • postInitialize

        public void postInitialize​(AbstractSession session)
        Description copied from interface: SerializedObjectPolicy
        postinitialize the policy: determine which mappings are included, which fields should be selected
      • getObjectFromRow

        public Object getObjectFromRow​(AbstractRecord databaseRow,
                                       AbstractSession session,
                                       ObjectLevelReadQuery query)
        Description copied from interface: SerializedObjectPolicy
        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).
      • getSelectionFields

        public List<DatabaseField> getSelectionFields()
        Description copied from interface: SerializedObjectPolicy
        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

        public List<DatabaseField> getAllSelectionFields()
        Description copied from interface: SerializedObjectPolicy
        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()).