Examples of unique()


Examples of javax.persistence.MapKeyColumn.unique()

    assertEquals( "", keyColAnno.columnDefinition() );
    assertEquals( "", keyColAnno.name() );
    assertEquals( "", keyColAnno.table() );
    assertFalse( keyColAnno.nullable() );
    assertTrue( keyColAnno.insertable() );
    assertFalse( keyColAnno.unique() );
    assertTrue( keyColAnno.updatable() );
    assertEquals( 255, keyColAnno.length() );
    assertEquals( 0, keyColAnno.precision() );
    assertEquals( 0, keyColAnno.scale() );
  }
View Full Code Here

Examples of javax.persistence.MapKeyColumn.unique()

    assertEquals( "int", keyColAnno.columnDefinition() );
    assertEquals( "col1", keyColAnno.name() );
    assertEquals( "table1", keyColAnno.table() );
    assertTrue( keyColAnno.nullable() );
    assertFalse( keyColAnno.insertable() );
    assertTrue( keyColAnno.unique() );
    assertFalse( keyColAnno.updatable() );
    assertEquals( 50, keyColAnno.length() );
    assertEquals( 2, keyColAnno.precision() );
    assertEquals( 1, keyColAnno.scale() );
  }
View Full Code Here

Examples of mungbean.protocol.command.admin.IndexOptionsBuilder.unique()

            }
            options.field(fieldName.toString()).ascending();
            fields = fields.pop();
        }
        if (unique) {
            options.unique();
        }
        if (dropDups) {
            options.dropDups();
        }
        ensureIndex(options);
View Full Code Here

Examples of org.cruxframework.crux.core.client.db.annotation.Store.Indexed.unique()

              String property = JClassUtils.getPropertyForGetterOrSetterMethod(method);
              if (!isValidTypeForKey(method.getReturnType()))
              {
                throw new CruxGeneratorException("Invalid index type for index on method ["+method.getReadableDeclaration()+"]. Crux databases only support Strings, integers, double or dates as part of a key or index");
              }
              result.add(new IndexData(new String[]{prefix+property}, indexed.unique(), false, prefix+property));
            }
          }
          else
          {
            String property = JClassUtils.getPropertyForGetterOrSetterMethod(method);
View Full Code Here

Examples of org.h2.jaqu.Table.JQIndex.unique()

        if (clazz.isAnnotationPresent(JQIndex.class)) {
            JQIndex indexAnnotation = clazz.getAnnotation(JQIndex.class);

            // setup the indexes, if properly annotated
            addIndexes(IndexType.STANDARD, indexAnnotation.standard());
            addIndexes(IndexType.UNIQUE, indexAnnotation.unique());
            addIndexes(IndexType.HASH, indexAnnotation.hash());
            addIndexes(IndexType.UNIQUE_HASH, indexAnnotation.uniqueHash());
        }
    }
View Full Code Here

Examples of org.mongodb.morphia.annotations.Indexed.unique()

                field.append(mf.getNameToStore());

                ensureIndex(dbColl,
                            index.name(),
                            new BasicDBObject(field.toString(), index.value().toIndexValue()),
                            index.unique(),
                            index.dropDups(),
                            index.background() ? index.background() : background,
                            index.sparse(),
                            index.expireAfterSeconds());
            }
View Full Code Here

Examples of org.springframework.data.mongodb.core.index.Index.unique()

  }

  @Test
  public void testWithDropDuplicates() {
    Index i = new Index().on("name", Direction.ASC);
    i.unique(Duplicates.DROP);
    assertEquals("{ \"name\" : 1}", i.getIndexKeys().toString());
    assertEquals("{ \"unique\" : true , \"dropDups\" : true}", i.getIndexOptions().toString());
  }

  @Test
View Full Code Here

Examples of pl.com.bottega.cqrs.annotations.Command.unique()

      return false;

    Command commandAnnotation = command.getClass().getAnnotation(
        Command.class);

    return commandAnnotation.unique();
  }

  private Long getUniqueStorageTimeout(Object command) {
    Command commandAnnotation = command.getClass().getAnnotation(
        Command.class);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.