Package com.cmobilecom.af.model.query
Class CheckNotNullProperty<T extends PersistenceEntity>
- java.lang.Object
-
- com.cmobilecom.af.model.bean.Component
-
- com.cmobilecom.af.model.property.EntityProperty<T>
-
- com.cmobilecom.af.model.query.CheckNotNullProperty<T>
-
- Type Parameters:
T
- entity type, a subclass of PersistenceEntity
- All Implemented Interfaces:
ClientBehaviorHolder
,MenuNodeActionHandler
,java.io.Serializable
public class CheckNotNullProperty<T extends PersistenceEntity> extends EntityProperty<T>
CheckNotNullProperty is an EntityProperty in query used to add notNull/isNull restriction to query.- Since:
- 2.2
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.cmobilecom.af.model.bean.Component
Component.ComponentVisitor
-
-
Field Summary
-
Fields inherited from class com.cmobilecom.af.model.property.EntityProperty
backingBean, COMMAND_OPEN_INPUT_DIALOG, CSS_ALIGN_CENTER, CSS_ALIGN_LEFT, CSS_ALIGN_RIGHT, CSS_BREAK_WORD, CSS_LONG_TEXT, CSS_PROPERTY_NAME_PREFIX, CSS_PROPERTY_VALUE_PREFIX, customProperty, EMAIL_PATTERN, KEY_DIALOG_ENTITY, NAME_PATH_SEPARATOR_CHAR, parent
-
Fields inherited from class com.cmobilecom.af.model.bean.Component
parentComponent, uiView
-
-
Constructor Summary
Constructors Constructor Description CheckNotNullProperty(PersistenceDataBackingBean<T> backingBean, java.lang.String name, java.lang.Class type, EntityProperty<T> parent)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Boolean
getNotNull()
Get notNull value.<R> javax.persistence.criteria.Predicate
getQueryCriterion(javax.persistence.criteria.CriteriaBuilder criteriaBuilder, javax.persistence.criteria.CriteriaQuery<R> criteriaQuery)
Add criterion: the property is not null.protected java.lang.Object
getValueInternal(T entity, boolean convertToString)
Get property value.java.lang.String
getValueStringNative(T entity)
Get property value as string for select items without localization using resource bundle.void
setNotNull(java.lang.Boolean notNull)
Set notNull value.boolean
setValueInternal(T entity, java.lang.Object value)
Set property value.void
setValueStringNative(T entity, java.lang.String value)
Set value from string.-
Methods inherited from class com.cmobilecom.af.model.property.EntityProperty
addChild, addChild, addChildren, addMenuNode, anyRowHasInvalidUserInput, asVisitTarget, autoCompleteSuggestions, canBeExecuteTarget, clearInvalidUserInput, clickLink, clickMenuNode, clickValueLink, convert, createDialogContent, getActionPartialBehavior, getActionRenderRegions, getBackingBean, getCheckImageURL, getChild, getChildCount, getChildren, getContainerBean, getContainerRenderRegions, getCurrentEntity, getCustomValue, getDisplayName, getDomEventDynamicHandler, getDomEventDynamicHandler, getDomEventSupport, getDomEventSupport, getEditable, getEmbeddedStatisticsValueString, getEntity, getEntityAttr, getEntityBackingBean, getGroup, getGroupPropertyList, getHelp, getHelpMessage, getInvalidUserInput, getMaxLength, getMaxValue, getMediaURLs, getMenuBean, getMenuBean, getMenuBean, getMenuNode, getMenuNodeCount, getMessage, getMinLength, getMinValue, getName, getNamePath, getNamePath, getOpenInputDialogMenuNode, getParent, getParent, getParentComponent, getPartialBehavior, getPartialBehaviorSupport, getPartialBehaviorSupport, getPath, getPattern, getPlaceholder, getPlaceholderText, getProgressDescriptor, getQueryInfo, getReadMethod, getReadMethod, getRenderStyle, getRoot, getRowIndex, getSelectItemCount, getSelectItems, getSelectPropertyQueryElements, getStatisticsValueString, getStyleClass, getStyleClassByNamePath, getStyleClassByNamePath, getType, getTypeOrMemberType, getValue, getValue, getValueAutoComplete, getValueBoolean, getValueBoolean, getValueChangePartialBehavior, getValueConverter, getValueDate, getValueDate, getValueInt, getValueInt, getValueInternal, getValueList, getValueList, getValueObject, getValueObject, getValueString, getValueString, getValueStringNative, getValueToShowOnActionClick, getViewConfig, getVisibleName, getVisibleName, getWriteMethod, handlePartialBehaviorEvent, handlePartialBehaviorEvent, hasInvalidUserInput, isAutoCompleteMultiValues, isCheckAvailabilityEnabled, isChildProperty, isCustomProperty, isDisplayValueOnly, isDynamicPartialBehaviorSupport, isDynamicRenderStyle, isDynamicSelectQuery, isDynamicValue, isEditable, isEditableIfCreating, isEditEnabled, isEntityDefined, isGrouping, isGroupTitleRow, isHelpRenderable, isHidden, isMarkAsRequired, isMenuNodeRenderable, isMessageRenderable, isNameRenderable, isOpenInputDialog, isReadOnly, isRenderable, isRenderAsOutputText, isRequired, isRequiredStarRenderable, isSelected, isShowIfNull, isShowing, isShowing, isShowing, isShowName, isUserDefined, isValidationDelayed, isValueRenderable, postInit, setBackingBean, setCheckAvailabilityEnabled, setChildren, setCurrentEntity, setCustomProperty, setCustomValue, setDefaultValueFromSelectItems, setDomEventSupport, setDynamicPartialBehaviorSupport, setDynamicRenderStyle, setDynamicSelectQuery, setDynamicValue, setEditable, setEditableIfCreating, setEditableRecursively, setEditEnabled, setEntityAttr, setGroup, setGrouping, setGroupTitleRow, setHelp, setHidden, setInvalidUserInput, setMarkAsRequired, setMaxLength, setMaxValue, setMessage, setMessage, setMessage, setMinLength, setMinValue, setName, setParent, setPartialBehaviorSupport, setPattern, setPlaceholder, setQueryInfo, setRenderStyle, setRenderStyle, setRequired, setSelected, setSelectPropertyQueryElements, setShowIfNull, setShowName, setStyleClass, setType, setValidationDelayed, setValue, setValue, setValue, setValue, setValueAutoComplete, setValueBoolean, setValueBoolean, setValueConverter, setValueDate, setValueDate, setValueInt, setValueInt, setValueList, setValueList, setValueObject, setValueString, setValueString, setValueStringNative, setVisibleName, setVisibleName, toString, validate, walkComponentTree
-
Methods inherited from class com.cmobilecom.af.model.bean.Component
existPathToAncestorType, getAuthenticatedUser, getBackingBeanContext, getCalcContext, getChildOfClosestAncestor, getClientId, getClosestAncestor, getComponentsOnPathTo, getCountryFromCurrentLocale, getCurrencyCode, getCurrentDate, getCurrentLocalDateTime, getDataAccessUnit, getDataAccessUnit, getDataConverter, getInstanceUser, getParameters, getParameters, getPathTo, getPersistenceEntityManager, getPersistenceEntityManager, getPersistenceEntityManager, getPersistenceEntityManager, getQueryHints, getResourceBundle, getRootComponent, getUiView, getUiView, getYearStartDate, isAncestorComponentOf, isEntityI18NEnabled, isInPageContent, setClientId, setParentComponent, setUiView
-
-
-
-
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 beanname
- property nametype
- property typeparent
- 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.
-
getValueStringNative
public java.lang.String getValueStringNative(T entity)
Description copied from class:EntityProperty
Get property value as string for select items without localization using resource bundle. If property type is PersistenceEntity, the string value must match the values of entity select items.- Overrides:
getValueStringNative
in classEntityProperty<T extends PersistenceEntity>
- Parameters:
entity
- the entity to get value from- Returns:
- value as string
- See Also:
SelectItemListProvider.getSelectItems(List, com.cmobilecom.af.model.container.EntityNameResolver, EntityProperty, boolean)
-
setValueStringNative
public void setValueStringNative(T entity, java.lang.String value)
Description copied from class:EntityProperty
Set value from string.- Overrides:
setValueStringNative
in classEntityProperty<T extends PersistenceEntity>
- Parameters:
entity
- the entity to set value tovalue
- as string
-
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 classEntityProperty<T extends PersistenceEntity>
- Parameters:
entity
- the entity to get value fromconvertToString
- 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 classEntityProperty<T extends PersistenceEntity>
- Parameters:
entity
- the entity of the property to set value tovalue
- 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 classEntityProperty<T extends PersistenceEntity>
- Parameters:
criteriaBuilder
- the CriteriaBuilder instancecriteriaQuery
- the CriteriaQuery being built- Returns:
- Predicate instance
- Throws:
SystemException
- throw if an error occurs
-
-