Class NotNullConstraint
- java.lang.Object
-
- org.nuxeo.ecm.core.schema.types.constraints.AbstractConstraint
-
- org.nuxeo.ecm.core.schema.types.constraints.NotNullConstraint
-
- All Implemented Interfaces:
Serializable
,Constraint
public class NotNullConstraint extends AbstractConstraint
This constraint ensure some object is not null.This class is a singleton. Use
get()
to get the singleton.- Since:
- 7.1
- Author:
- Nicolas Chapurlat
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.nuxeo.ecm.core.schema.types.constraints.Constraint
Constraint.Description
-
-
Field Summary
-
Fields inherited from interface org.nuxeo.ecm.core.schema.types.constraints.Constraint
MESSAGES_BUNDLE, MESSAGES_DEFAULT_LANG, MESSAGES_KEY
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
static NotNullConstraint
get()
Constraint.Description
getDescription()
Here, value is :
name = "NotNullConstraint".int
hashCode()
boolean
validate(Object object)
Validates the given object against this constraint.-
Methods inherited from class org.nuxeo.ecm.core.schema.types.constraints.AbstractConstraint
getErrorMessage, getMessageKey, getMessageString, toString
-
-
-
-
Method Detail
-
get
public static NotNullConstraint get()
-
validate
public boolean validate(Object object)
Description copied from interface:Constraint
Validates the given object against this constraint.If some object is null. Constraint should return true while validating unless the constraint deals with nullable state.
- Parameters:
object
- the object to validate- Returns:
- true if the object was successfully validated, false otherwise
-
getDescription
public Constraint.Description getDescription()
- Returns:
- The constraint description.
-
-