Class CheckNotNullProperty<T extends PersistenceEntity>

    • Constructor Detail

      • CheckNotNullProperty

        public CheckNotNullProperty​(PersistenceDataBackingBean<T> backingBean,
                                    java.lang.String name,
                                    java.lang.Class type,
                                    EntityProperty<T> parent)
                             throws SystemException
        Constructor.
        Parameters:
        backingBean - entity or entity list backing bean
        name - property name
        type - property type
        parent - parent property
        Throws:
        SystemException - throw if an error occurs
    • Method Detail

      • getNotNull

        public java.lang.Boolean getNotNull()
        Get notNull value. true: not null; false: is null; null: ignore.
        Returns:
        boolean value or null.
      • setNotNull

        public void setNotNull​(java.lang.Boolean notNull)
        Set notNull value. true: not null; false: is null; null: ignore.
        Parameters:
        notNull - the value to set.
      • getValueInternal

        protected java.lang.Object getValueInternal​(T entity,
                                                    boolean convertToString)
                                             throws SystemException
        Description copied from class: EntityProperty
        Get property value. return previous invalid input value (if any) to display invalid input back to user.
        Overrides:
        getValueInternal in class EntityProperty<T extends PersistenceEntity>
        Parameters:
        entity - the entity to get value from
        convertToString - flag indicating whether the property value should be converted into a string
        Returns:
        property value
        Throws:
        SystemException - throw if an error occurs
      • setValueInternal

        public boolean setValueInternal​(T entity,
                                        java.lang.Object value)
        Description copied from class: EntityProperty
        Set property value. If the value is a string, convert the string to the property type if necessary. If the value is not a string, no type conversion.
        Overrides:
        setValueInternal in class EntityProperty<T extends PersistenceEntity>
        Parameters:
        entity - the entity of the property to set value to
        value - the property value to set
        Returns:
        true if value is changed and set successfully, false if not changed or value is invalid
      • getQueryCriterion

        public <R> javax.persistence.criteria.Predicate getQueryCriterion​(javax.persistence.criteria.CriteriaBuilder criteriaBuilder,
                                                                          javax.persistence.criteria.CriteriaQuery<R> criteriaQuery)
                                                                   throws SystemException
        Add criterion: the property is not null.
        Overrides:
        getQueryCriterion in class EntityProperty<T extends PersistenceEntity>
        Parameters:
        criteriaBuilder - the CriteriaBuilder instance
        criteriaQuery - the CriteriaQuery being built
        Returns:
        Predicate instance
        Throws:
        SystemException - throw if an error occurs