Package com.db4o.constraints
Class UniqueFieldValueConstraint
- java.lang.Object
- 
- com.db4o.constraints.UniqueFieldValueConstraint
 
- 
- All Implemented Interfaces:
- ConfigurationItem
 
 public class UniqueFieldValueConstraint extends java.lang.Object implements ConfigurationItem Configures a field of a class to allow unique values only. In C/S mode, add this configuration-item to the server side only. You need to turn on indexing for the given field, otherwise the unique constrain won't work. Add this to your configuration withCommonConfiguration.add(com.db4o.config.ConfigurationItem)
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.lang.Object_clazzprotected java.lang.String_fieldName
 - 
Constructor SummaryConstructors Constructor Description UniqueFieldValueConstraint(java.lang.Object clazz, java.lang.String fieldName)constructor to create a UniqueFieldValueConstraint.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(InternalObjectContainer objectContainer)internal method, public for implementation reasons.voidprepare(Configuration configuration)Gives a chance for the item to augment the configuration.
 
- 
- 
- 
Constructor Detail- 
UniqueFieldValueConstraintpublic UniqueFieldValueConstraint(java.lang.Object clazz, java.lang.String fieldName)constructor to create a UniqueFieldValueConstraint.- Parameters:
- clazz- can be a class (Java) / Type (.NET) / instance of the class / fully qualified class name
- fieldName- the name of the field that is to be unique.
 
 
- 
 - 
Method Detail- 
preparepublic void prepare(Configuration configuration) Description copied from interface:ConfigurationItemGives a chance for the item to augment the configuration.- Specified by:
- preparein interface- ConfigurationItem
- Parameters:
- configuration- the configuration that the item was added to
 
 - 
applypublic void apply(InternalObjectContainer objectContainer) internal method, public for implementation reasons.- Specified by:
- applyin interface- ConfigurationItem
- Parameters:
- objectContainer- the ObjectContainer to configure
 
 
- 
 
-