Indexable.java :  » Database-DBMS » perst » org » garret » perst » Java Open Source

Java Open Source » Database DBMS » perst 
perst » org » garret » perst » Indexable.java
package org.garret.perst;

import java.lang.annotation.*;

/**
  * Annotation for marking indexable fields used by Database class to create table descriptors. 
  * Indices can be unique or allow duplicates.
  * If index is marked as unique and during transaction commit it is find out that there is already some other object
  * with this key, NotUniqueException will be thrown
  * Case insensitive attribute is meaningful only for string keys and if set cause ignoring case
  * of key values.
  */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Indexable {
    boolean unique() default false;
    boolean caseInsensitive() default false;
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.