Class MEntityType

All Implemented Interfaces:
Serializable, Cloneable, Comparator<Object>, I_AD_EntityType, I_Persistent, Evaluatee, ImmutablePOSupport

public class MEntityType extends X_AD_EntityType implements ImmutablePOSupport
Entity Type Model
Version:
$Id: MEntityType.java,v 1.2 2006/07/30 00:51:02 jjanke Exp $
Author:
Jorg Janke, Teo Sarca
  • BF [ 2827777 ] MEntityType.isSystemMaintained not working well https://sourceforge.net/p/adempiere/bugs/1993/
  • FR [ 2827786 ] Introduce MEntityType.get(Properties ctx, String entityType) https://sourceforge.net/p/adempiere/feature-requests/778/
  • BF [ 2861194 ] EntityType is not using normal PO framework for getting IDs https://sourceforge.net/p/adempiere/bugs/2103/
  • See Also:
    • Constructor Details

      • MEntityType

        public MEntityType(Properties ctx, String AD_EntityType_UU, String trxName)
        UUID based Constructor
        Parameters:
        ctx - Context
        AD_EntityType_UU - UUID key
        trxName - Transaction
      • MEntityType

        public MEntityType(Properties ctx, int AD_EntityType_ID, String trxName)
        Standard Constructor
        Parameters:
        ctx - context
        AD_EntityType_ID - id
        trxName - transaction
      • MEntityType

        public MEntityType(Properties ctx, ResultSet rs, String trxName)
        Load Constructor
        Parameters:
        ctx - context
        rs - result set
        trxName - transaction
      • MEntityType

        public MEntityType(MEntityType copy)
        Copy constructor
        Parameters:
        copy -
      • MEntityType

        public MEntityType(Properties ctx, MEntityType copy)
        Copy constructor
        Parameters:
        ctx -
        copy -
      • MEntityType

        public MEntityType(Properties ctx, MEntityType copy, String trxName)
        Copy constructor
        Parameters:
        ctx -
        copy -
        trxName -
    • Method Details

      • get

        public static MEntityType get(String entityType)
        Get EntityType object by name (immutable)
        Parameters:
        entityType -
        Returns:
        entity type
      • get

        public static MEntityType get(Properties ctx, String entityType)
        Get EntityType object by name (immutable)
        Parameters:
        ctx -
        entityType -
        Returns:
        entity type
      • isSystemMaintained

        public boolean isSystemMaintained()
        Is System Maintained. Any Entity Type with ID < 1000000.
        Returns:
        true if D/C/U/CUST/A/EXT/XX (ID < 1000000)
      • beforeSave

        protected boolean beforeSave(boolean newRecord)
        Description copied from class: PO
        Called before Save for Pre-Save Operation.
        Default implementation is nop, to be implemented in sub-classes that needed it.
        Overrides:
        beforeSave in class PO
        Parameters:
        newRecord - true if it is a new record
        Returns:
        true if record can be saved
      • beforeDelete

        protected boolean beforeDelete()
        Description copied from class: PO
        Execute before Delete operations.
        Default implementation is nop, to be implemented in sub-classes that needed it.
        Overrides:
        beforeDelete in class PO
        Returns:
        true if record can be deleted
      • markImmutable

        public MEntityType markImmutable()
        Description copied from interface: ImmutablePOSupport
        mark PO as immutable
        Specified by:
        markImmutable in interface ImmutablePOSupport
        Returns:
        PO