db4o 7.4

com.db4o.constraints
Class UniqueFieldValueConstraint

java.lang.Object
  extended by 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.


Constructor Summary
UniqueFieldValueConstraint(java.lang.Object clazz, java.lang.String fieldName)
          constructor to create a UniqueFieldValueConstraint.
 
Method Summary
 void apply(com.db4o.internal.InternalObjectContainer objectContainer)
          internal method, public for implementation reasons.
 void prepare(Configuration configuration)
          Gives a chance for the item to augment the configuration.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniqueFieldValueConstraint

public 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

prepare

public void prepare(Configuration configuration)
Description copied from interface: ConfigurationItem
Gives a chance for the item to augment the configuration.

Specified by:
prepare in interface ConfigurationItem
Parameters:
configuration - the configuration that the item was added to

apply

public void apply(com.db4o.internal.InternalObjectContainer objectContainer)
internal method, public for implementation reasons.

Specified by:
apply in interface ConfigurationItem
Parameters:
objectContainer - the ObjectContainer to configure

db4o 7.4

Copyright 2007 db4objects Inc. All rights reserved.