public class DomainConstraint extends AbstractDataConstraint
Title: Framework Support Library
Description: Defines a Domain Constraint.
String
Byte
Short
Integer
Long
Float
Double
BigDecimal
Date
Copyright: Copyright (c) 2011
Company: StreamScape Technologies
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MODEL |
DEFAULT_SERIAL_VERSION_ID
Constructor and Description |
---|
DomainConstraint(java.lang.String name,
java.lang.String description,
java.util.Set values) |
Modifier and Type | Method and Description |
---|---|
void |
addBigDecimalValue(java.math.BigDecimal value)
Adds the specified
BigDecimal value to the domain. |
void |
addByteValue(byte value)
Adds the specified
byte value to the domain. |
void |
addDateValue(java.util.Date value)
Adds the specified
Date value to the domain. |
void |
addDoubleValue(double value)
Adds the specified
double value to the domain. |
void |
addFloatValue(float value)
Adds the specified
float value to the domain. |
void |
addIntValue(int value)
Adds the specified
int value to the domain. |
void |
addLongValue(long value)
Adds the specified
long value to the domain. |
void |
addShortValue(short value)
Adds the specified
short value to the domain. |
void |
addStringValue(java.lang.String value)
Adds the specified
String value to the domain. |
void |
addValues(java.util.Set values)
Adds the specified values to the domain.
|
void |
clear() |
DomainConstraint |
clone()
Clones the object.
|
boolean |
containsBigDecimalValue(java.math.BigDecimal value)
Checks if the domain contains the specified
BigDecimal value. |
boolean |
containsByteValue(byte value)
Checks if the domain contains the specified
byte value. |
boolean |
containsDateValue(java.util.Date value)
Checks if the domain contains the specified
Date value. |
boolean |
containsDoubleValue(double value)
Checks if the domain contains the specified
double value. |
boolean |
containsFloatValue(float value)
Checks if the domain contains the specified
float value. |
boolean |
containsIntValue(int value)
Checks if the domain contains the specified
int value. |
boolean |
containsLongValue(long value)
Checks if the domain contains the specified
long value. |
boolean |
containsShortValue(short value)
Checks if the domain contains the specified
short value. |
boolean |
containsStringValue(java.lang.String value)
Checks if the domain contains the specified
String value. |
boolean |
equals(java.lang.Object other) |
java.lang.String |
getModel()
Returns a model name of the constraint.
|
DomainConstraintType |
getType()
Returns a type of the domain.
|
java.util.List |
listBigDecimalValues()
Returns a list of
BigDecimal values contained in the domain. |
java.util.List |
listByteValues()
Returns a list of
Byte values contained in the domain. |
java.util.List |
listDateValues()
Returns a list of
Date values contained in the domain. |
java.util.List |
listDoubleValues()
Returns a list of
Double values contained in the domain. |
java.util.List |
listFloatValues()
Returns a list of
Float values contained in the domain. |
java.util.List |
listIntValues()
Returns a list of
Integer values contained in the domain. |
java.util.List |
listLongValues()
Returns a list of
Long values contained in the domain. |
java.util.List |
listShortValues()
Returns a list of
Short values contained in the domain. |
java.util.List |
listStringValues()
Returns a list of
String values contained in the domain. |
java.util.List |
listValues()
Returns a list of all values contained in the domain.
|
boolean |
matchesValue(java.lang.Object value)
Checks if the specified value matches the constraint.
|
void |
removeBigDecimalValue(java.math.BigDecimal value)
Removes the specified
BigDecimal value from the domain. |
void |
removeByteValue(byte value)
Removes the specified
byte value from the domain. |
void |
removeDateValue(java.util.Date value)
Removes the specified
Date value from the domain. |
void |
removeDoubleValue(double value)
Removes the specified
double value from the domain. |
void |
removeFloatValue(float value)
Removes the specified
float value from the domain. |
void |
removeIntValue(int value)
Removes the specified
int value from the domain. |
void |
removeLongValue(long value)
Removes the specified
long value from the domain. |
void |
removeShortValue(short value)
Removes the specified
short value from the domain. |
void |
removeStringValue(java.lang.String value)
Removes the specified
String value from the domain. |
void |
removeValues(java.util.Set values)
Removes the specified values from the domain.
|
getDescription, setDescription
getSerialVersionUID
getClass, hashCode, notify, notifyAll, wait, wait, wait
getName
public static final java.lang.String MODEL
public DomainConstraint(java.lang.String name, java.lang.String description, java.util.Set values)
public java.lang.String getModel()
DataConstraint
public boolean matchesValue(java.lang.Object value)
DataConstraint
value
- the value to be checked.true
if the specified value matches the constraint, false
otherwise.public DomainConstraintType getType()
public void addValues(java.util.Set values)
If any value is of an inappropriate type, it is simply ignored.
values
- the values to be added.public void removeValues(java.util.Set values)
If any value is of an inappropriate type, it is simply ignored.
values
- the values to be removed.public java.util.List listValues()
public void addStringValue(java.lang.String value)
String
value to the domain.value
- the value to be added.public void removeStringValue(java.lang.String value)
String
value from the domain.value
- the value to be removed.public boolean containsStringValue(java.lang.String value)
String
value.value
- the value to be checked.true
if the domain contains the specified value, false
otherwise.public java.util.List listStringValues()
String
values contained in the domain.String
values in the domain or an empty list if the domain does not contain such values.public void addByteValue(byte value)
byte
value to the domain.value
- the value to be added.public void removeByteValue(byte value)
byte
value from the domain.value
- the value to be removed.public boolean containsByteValue(byte value)
byte
value.value
- the value to be checked.true
if the domain contains the specified value, false
otherwise.public java.util.List listByteValues()
Byte
values contained in the domain.Byte
values in the domain or an empty list if the domain does not contain such values.public void addShortValue(short value)
short
value to the domain.value
- the value to be added.public void removeShortValue(short value)
short
value from the domain.value
- the value to be removed.public boolean containsShortValue(short value)
short
value.value
- the value to be checked.true
if the domain contains the specified value, false
otherwise.public java.util.List listShortValues()
Short
values contained in the domain.Short
values in the domain or an empty list if the domain does not contain such values.public void addIntValue(int value)
int
value to the domain.value
- the value to be added.public void removeIntValue(int value)
int
value from the domain.value
- the value to be removed.public boolean containsIntValue(int value)
int
value.value
- the value to be checked.true
if the domain contains the specified value, false
otherwise.public java.util.List listIntValues()
Integer
values contained in the domain.Integer
values in the domain or an empty list if the domain does not contain such values.public void addLongValue(long value)
long
value to the domain.value
- the value to be added.public void removeLongValue(long value)
long
value from the domain.value
- the value to be removed.public boolean containsLongValue(long value)
long
value.value
- the value to be checked.true
if the domain contains the specified value, false
otherwise.public java.util.List listLongValues()
Long
values contained in the domain.Long
values in the domain or an empty list if the domain does not contain such values.public void addFloatValue(float value)
float
value to the domain.value
- the value to be added.public void removeFloatValue(float value)
float
value from the domain.value
- the value to be removed.public boolean containsFloatValue(float value)
float
value.value
- the value to be checked.true
if the domain contains the specified value, false
otherwise.public java.util.List listFloatValues()
Float
values contained in the domain.Float
values in the domain or an empty list if the domain does not contain such values.public void addDoubleValue(double value)
double
value to the domain.value
- the value to be added.public void removeDoubleValue(double value)
double
value from the domain.value
- the value to be removed.public boolean containsDoubleValue(double value)
double
value.value
- the value to be checked.true
if the domain contains the specified value, false
otherwise.public java.util.List listDoubleValues()
Double
values contained in the domain.Double
values in the domain or an empty list if the domain does not contain such values.public void addBigDecimalValue(java.math.BigDecimal value)
BigDecimal
value to the domain.value
- the value to be added.public void removeBigDecimalValue(java.math.BigDecimal value)
BigDecimal
value from the domain.value
- the value to be removed.public boolean containsBigDecimalValue(java.math.BigDecimal value)
BigDecimal
value.value
- the value to be checked.true
if the domain contains the specified value, false
otherwise.public java.util.List listBigDecimalValues()
BigDecimal
values contained in the domain.BigDecimal
values in the domain or an empty list if the domain does not contain such values.public void addDateValue(java.util.Date value)
Date
value to the domain.value
- the value to be added.public void removeDateValue(java.util.Date value)
Date
value from the domain.value
- the value to be removed.public boolean containsDateValue(java.util.Date value)
Date
value.value
- the value to be checked.true
if the domain contains the specified value, false
otherwise.public java.util.List listDateValues()
Date
values contained in the domain.Date
values in the domain or an empty list if the domain does not contain such values.public void clear()
public DomainConstraint clone()
CloneableDataObject
clone
in interface CloneableObject
clone
in class CloneableDataObject
public boolean equals(java.lang.Object other)
equals
in class com.streamscape.sdo.AbstractNamedObject
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.