Class EntityOptionsImpl

    • Field Detail

      • OPTION_NO_MODELDEFAULTS

        public static final java.lang.String OPTION_NO_MODELDEFAULTS
        don't apply model defaults.
        See Also:
        Constant Field Values
      • OPTION_NO_PRIMARY

        public static final java.lang.String OPTION_NO_PRIMARY
        don't generate ID as primary key.
        See Also:
        Constant Field Values
      • OPTION_TABLESERIAL

        public static final java.lang.String OPTION_TABLESERIAL
        column tableserial is provided.
        See Also:
        Constant Field Values
      • OPTION_TOKENLOCK

        public static final java.lang.String OPTION_TOKENLOCK
        token lock columns editedBy/Since/Expiry are provided.
        See Also:
        Constant Field Values
      • OPTION_NORMTEXT

        public static final java.lang.String OPTION_NORMTEXT
        normText is provided.
        See Also:
        Constant Field Values
      • OPTION_ROOT

        public static final java.lang.String OPTION_ROOT
        root entity.
        See Also:
        Constant Field Values
      • OPTION_ROOTID

        public static final java.lang.String OPTION_ROOTID
        rootid is provided.
        See Also:
        Constant Field Values
      • OPTION_ROOTCLASSID

        public static final java.lang.String OPTION_ROOTCLASSID
        rootclassid is provided.
        See Also:
        Constant Field Values
      • OPTION_REMOTE

        public static final java.lang.String OPTION_REMOTE
        enable remoting.
        See Also:
        Constant Field Values
    • Constructor Detail

      • EntityOptionsImpl

        public EntityOptionsImpl​(EntityFactory factory,
                                 Entity entity,
                                 SourceInfo sourceInfo)
        Creates entity options.
        Parameters:
        factory - the factory
        entity - the entity the options belong to
        sourceInfo - the source info
    • Method Detail

      • getEntity

        public Entity getEntity()
        Description copied from interface: EntityOptions
        Gets the entity this option-set belongs to.
        Specified by:
        getEntity in interface EntityOptions
        Returns:
        the entity
      • noModelDefaults

        public boolean noModelDefaults()
        Description copied from interface: EntityOptions
        Returns whether global model defaults should be applied or not.
        Specified by:
        noModelDefaults in interface EntityOptions
        Returns:
        true if ignore model defaults completely
      • applyOption

        public boolean applyOption​(java.lang.String option,
                                   java.lang.Boolean ctrl)
                            throws ModelException
        Description copied from class: CommonOptionsImpl
        Applies given option string.
        Overrides:
        applyOption in class CommonOptionsImpl
        Parameters:
        option - the option string
        ctrl - option control: true if turn option on, false if oprion off, null if on/off missing (defaults to on)
        Returns:
        true if applied, false if unknown option
        Throws:
        ModelException - if applying the option failed
      • processSorting

        public boolean processSorting​(java.lang.String token)
        Checks that the sorting string starts with a + or -.
        Parameters:
        token - the sorting token
        Returns:
        true if applied
      • isNoPrimaryKey

        public boolean isNoPrimaryKey()
        Description copied from interface: EntityOptions
        true if [NOPKEY]-option set.
        Specified by:
        isNoPrimaryKey in interface EntityOptions
        Returns:
        the NoPrimary
      • isTableSerialProvided

        public boolean isTableSerialProvided()
        Description copied from interface: EntityOptions
        true if [TABLESERIAL]-option set.
        Specified by:
        isTableSerialProvided in interface EntityOptions
        Returns:
        true if tableserial column provided
      • isTokenLockProvided

        public boolean isTokenLockProvided()
        Description copied from interface: EntityOptions
        true if [EDITEDBY]-option set.
        Specified by:
        isTokenLockProvided in interface EntityOptions
        Returns:
        truf if editedby token columns provided
      • isNormTextProvided

        public boolean isNormTextProvided()
        Description copied from interface: EntityOptions
        true if [NORMTEXT]-option set.
        Specified by:
        isNormTextProvided in interface EntityOptions
        Returns:
        true if normtext column provided
      • isRoot

        public boolean isRoot()
        Description copied from interface: EntityOptions
        true if [ROOT]-option set
        Specified by:
        isRoot in interface EntityOptions
        Returns:
        true if this is a root entity
      • isRootIdProvided

        public boolean isRootIdProvided()
        Description copied from interface: EntityOptions
        true if [ROOTID]-option set.
        Specified by:
        isRootIdProvided in interface EntityOptions
        Returns:
        true if rootid column provided
      • isRootClassIdProvided

        public boolean isRootClassIdProvided()
        Description copied from interface: EntityOptions
        true if [ROOTCLASSID]-option set.
        Specified by:
        isRootClassIdProvided in interface EntityOptions
        Returns:
        true if rootclassid column provided
      • isRemote

        public boolean isRemote()
        Description copied from interface: EntityOptions
        Returns whether entity supports remoting.
        Specified by:
        isRemote in interface EntityOptions
        Returns:
        true if with remoting, false if only local
      • getSorting

        public java.util.List<java.lang.String> getSorting()
        Description copied from interface: EntityOptions
        Gets the default sorting options.
        Specified by:
        getSorting in interface EntityOptions
        Returns:
        the default sorting, null if none
      • setNoModelDefaults

        public void setNoModelDefaults​(boolean noModelDefaults)
      • setTrackType

        public void setTrackType​(TrackType trackType)
      • setEditedByProvided

        public void setEditedByProvided​(boolean tokenLockProvided)
      • setNormTextProvided

        public void setNormTextProvided​(boolean normText)
      • setNoPrimaryKey

        public void setNoPrimaryKey​(boolean noPrimary)
      • setTableSerialProvided

        public void setTableSerialProvided​(boolean tableSerial)
      • setRootEntity

        public void setRootEntity​(boolean rootEntity)
      • setRootIdProvided

        public void setRootIdProvided​(boolean rootId)
      • setRootClassIdProvided

        public void setRootClassIdProvided​(boolean rootClassId)
      • setRemote

        public void setRemote​(boolean remote)