Package com.exedio.cope
Class UniqueConstraint
- java.lang.Object
-
- com.exedio.cope.Feature
-
- com.exedio.cope.UniqueConstraint
-
- All Implemented Interfaces:
Copyable
,Serializable
public final class UniqueConstraint extends Feature implements Copyable
- See Also:
- Serialized Form
-
-
Constructor Summary
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description UniqueConstraint
copy(CopyMapper mapper)
List<FunctionField<?>>
getFields()
List<FunctionField<?>>
getUniqueAttributes()
Deprecated.Renamed togetFields()
.<P extends Item>
Psearch(Class<P> typeClass, Object... values)
Finds an item by its unique fields.Item
search(Object... values)
Finds an item by its unique fields.<P extends Item>
PsearchStrict(Class<P> typeClass, Object... values)
Finds an item by its unique fields.Item
searchStrict(Object... values)
Finds an item by its unique fields.<P extends Item>
PsearchUnique(Class<P> typeClass, Object... values)
Deprecated.Usesearch(Class,Object[])
insteadItem
searchUnique(Object... values)
Deprecated.Usesearch(Object[])
instead-
Methods inherited from class com.exedio.cope.Feature
afterModelCreated, getAbstractType, getAnnotation, getID, getLocalizationKeys, getName, getPattern, getType, isAnnotationPresent, isSourceAlready, mount, readResolve, requireMounted, toString, toString, writeReplace
-
-
-
-
Constructor Detail
-
UniqueConstraint
public UniqueConstraint(FunctionField<?> field1, FunctionField<?> field2)
-
UniqueConstraint
public UniqueConstraint(FunctionField<?> field1, FunctionField<?> field2, FunctionField<?> field3)
-
UniqueConstraint
public UniqueConstraint(FunctionField<?> field1, FunctionField<?> field2, FunctionField<?> field3, FunctionField<?> field4)
-
UniqueConstraint
public UniqueConstraint(FunctionField<?> field1, FunctionField<?> field2, FunctionField<?> field3, FunctionField<?> field4, FunctionField<?> field5)
-
UniqueConstraint
public UniqueConstraint(FunctionField<?> field1, FunctionField<?> field2, FunctionField<?> field3, FunctionField<?> field4, FunctionField<?> field5, FunctionField<?> field6)
-
UniqueConstraint
public UniqueConstraint(FunctionField<?> field1, FunctionField<?> field2, FunctionField<?> field3, FunctionField<?> field4, FunctionField<?> field5, FunctionField<?> field6, FunctionField<?> field7)
-
UniqueConstraint
public UniqueConstraint(FunctionField<?> field1, FunctionField<?> field2, FunctionField<?> field3, FunctionField<?> field4, FunctionField<?> field5, FunctionField<?> field6, FunctionField<?> field7, FunctionField<?> field8)
-
UniqueConstraint
public UniqueConstraint(FunctionField<?> field1, FunctionField<?> field2, FunctionField<?> field3, FunctionField<?> field4, FunctionField<?> field5, FunctionField<?> field6, FunctionField<?> field7, FunctionField<?> field8, FunctionField<?> field9)
-
UniqueConstraint
public UniqueConstraint(FunctionField<?> field1, FunctionField<?> field2, FunctionField<?> field3, FunctionField<?> field4, FunctionField<?> field5, FunctionField<?> field6, FunctionField<?> field7, FunctionField<?> field8, FunctionField<?> field9, FunctionField<?> field10)
-
UniqueConstraint
public UniqueConstraint(FunctionField<?> field1, FunctionField<?> field2, FunctionField<?> field3, FunctionField<?> field4, FunctionField<?> field5, FunctionField<?> field6, FunctionField<?> field7, FunctionField<?> field8, FunctionField<?> field9, FunctionField<?> field10, FunctionField<?> field11)
-
UniqueConstraint
public UniqueConstraint(FunctionField<?> field1, FunctionField<?> field2, FunctionField<?> field3, FunctionField<?> field4, FunctionField<?> field5, FunctionField<?> field6, FunctionField<?> field7, FunctionField<?> field8, FunctionField<?> field9, FunctionField<?> field10, FunctionField<?> field11, FunctionField<?> field12)
-
-
Method Detail
-
copy
public UniqueConstraint copy(CopyMapper mapper)
-
getFields
public List<FunctionField<?>> getFields()
-
search
public Item search(Object... values)
Finds an item by its unique fields.- Returns:
- null if there is no matching item.
-
searchStrict
public Item searchStrict(Object... values) throws IllegalArgumentException
Finds an item by its unique fields.- Throws:
IllegalArgumentException
- if there is no matching item.
-
search
@Nullable public <P extends Item> P search(Class<P> typeClass, Object... values)
Finds an item by its unique fields.- Returns:
- null if there is no matching item.
-
searchStrict
@Nonnull public <P extends Item> P searchStrict(Class<P> typeClass, Object... values) throws IllegalArgumentException
Finds an item by its unique fields.- Throws:
IllegalArgumentException
- if there is no matching item.
-
getUniqueAttributes
@Deprecated public List<FunctionField<?>> getUniqueAttributes()
Deprecated.Renamed togetFields()
.
-
searchUnique
@Deprecated public Item searchUnique(Object... values)
Deprecated.Usesearch(Object[])
instead
-
searchUnique
@Deprecated public <P extends Item> P searchUnique(Class<P> typeClass, Object... values)
Deprecated.Usesearch(Class,Object[])
instead
-
-