Examples of PrimaryKey


Examples of br.com.objectos.way.relational.PrimaryKey

    assertThat(before.get(3).toString(), equalTo("Duo{id=4, a=B, b=A}"));
    assertThat(before.get(4).toString(), equalTo("Duo{id=5, a=B, b=B}"));
    assertThat(before.get(5).toString(), equalTo("Duo{id=6, a=B, b=C}"));

    Duo duo = new Duo("XXX", "ZZZ");
    atomicMerge.update(duo).with(new PrimaryKey(3));

    List<Duo> after = findAll();

    assertThat(after.size(), equalTo(6));
    assertThat(after.get(0).toString(), equalTo("Duo{id=1, a=A, b=A}"));
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.document.PrimaryKey

     * Sets the primary key with the specified hash-only key name and value.
     */
    public AbstractSpecWithPrimaryKey<T> withPrimaryKey(String hashKeyName, Object hashKeyValue) {
        if (hashKeyName == null)
            throw new IllegalArgumentException();
        withPrimaryKey(new PrimaryKey(hashKeyName, hashKeyValue));
        return this;
    }
View Full Code Here

Examples of com.asakusafw.vocabulary.bulkloader.PrimaryKey

        object.set("sid", 257L);
        assertThat(object.get("sid"), eq(257L));
        object.set("value", new Text("Hello, DMDL!"));
        assertThat(object.get("value"), eq(new Text("Hello, DMDL!")));

        PrimaryKey pk = object.unwrap().getClass().getAnnotation(PrimaryKey.class);
        assertThat(pk, not(nullValue()));
        assertThat(pk.value(), is(new String[] { "sid" }));
    }
View Full Code Here

Examples of com.foundationdb.ais.model.PrimaryKey

class PrimaryKeyIsNotNull implements AISValidation {

    @Override
    public void validate(AkibanInformationSchema ais, AISValidationOutput output) {
        for (Table table : ais.getTables().values()) {
            PrimaryKey index = table.getPrimaryKeyIncludingInternal();
            if(index == null) {
                continue; // Checked by TableHasPrimaryKey
            }
            for (Column column : index.getColumns()) {
                if (column.getNullable()) {
                    output.reportFailure(new AISValidationFailure (
                            new PrimaryKeyNullColumnException (table.getName(), column.getName())));
                }
            }
View Full Code Here

Examples of com.jengine.orm.model.field.PrimaryKey

                    new ReferenceField(fieldClass, map(
                            "referenceModelName", manager.getName(),
                            "referenceModelKeyName", getKeyFieldName(),
                            "columnName", manager.getTableName().toLowerCase()))
            );
            middleModelClass.getManager().addField("id", new PrimaryKey());
        }
    }
View Full Code Here

Examples of com.openbravo.data.model.PrimaryKey

                new Field(AppLocal.getIntString("Label.Name"), Datas.STRING, Formats.STRING, true, true, true)
        );

        Table table = new Table(
                "ATTRIBUTESET",
                new PrimaryKey("ID"),
                new Column("NAME"));

        lpr = row.getListProvider(app.getSession(), table);
        spr = row.getSaveProvider(app.getSession(), table);
View Full Code Here

Examples of com.scooterframework.orm.sqldataexpress.object.PrimaryKey

        List<String> columns = null;
        try {
          if (connName == null)
            connName = DatabaseConfig.getInstance().getDefaultDatabaseConnectionName();
            PrimaryKey pk = SqlExpressUtil.lookupPrimaryKey(connName, tableName);

            if (pk == null) {
                log.info("There is no primary key detected for table \"" +
                    tableName + "\" as it may be just a resource, " +
                    "not a real table, maybe a view. \"" +
                        RouteConstants.ROUTE_DEFAULT_ID +
                        "\" will be used to represent dynamic id for " +
                        model + " in the route definition instead.");
            }
            else {
                columns = pk.getColumns();
            }
        } catch(Exception ex) {
          log.error(ex);
        }
View Full Code Here

Examples of com.tll.model.key.PrimaryKey

    try {
      final ModelKey mkey = search.getKey();
      final IEntityType et = mkey.getEntityType();
      final Class<IEntity> ec = (Class<IEntity>) context.getEntityTypeResolver().resolveEntityClass(et);
      final IEntityService<IEntity> svc = getEntityService(et);
      final IEntity e = svc.load(new PrimaryKey(ec, mkey.getId()));
      return e;
    }
    catch(final EntityNotFoundException e) {
      RpcServlet.exceptionToStatus(e, status);
      return null;
View Full Code Here

Examples of henplus.sqlmodel.PrimaryKey

            throws SQLException {

        Table table = null;
        if (rset != null) {
            table = new Table(tableName);
            final PrimaryKey pk = getPrimaryKey(meta, tableName);
            final Map<String, ColumnFkInfo> fks = getForeignKeys(meta, tableName);
            // what about the following duplicate?
            // rset = meta.getColumns(catalog, null, tableName, null);
            while (!_interrupted && rset.next()) {
                final String colname = rset.getString(COLUMN_NAME);
                final Column column = new Column(colname);
                column.setType(rset.getString(TYPE_NAME));
                column.setSize(rset.getInt(COLUMN_SIZE));
                final boolean nullable = rset.getInt(NULLABLE) == DatabaseMetaData.columnNullable ? true : false;
                column.setNullable(nullable);
                final String defaultVal = rset.getString(COLUMN_DEF);
                column.setDefault(defaultVal != null ? defaultVal.trim() : null);
                column.setPosition(rset.getInt(ORDINAL_POSITION));
                column.setPkInfo(pk.getColumnPkInfo(colname));
                column.setFkInfo(fks.get(colname));

                table.addColumn(column);
            }
            rset.close();
View Full Code Here

Examples of liquibase.structure.core.PrimaryKey

public class PrimaryKeyTest  {

    @Test
    public void setColumn_singlePKColumn() {
        PrimaryKey pk = new PrimaryKey();
        pk.addColumn(0, new Column("id"));

        assertEquals(1, pk.getColumnNamesAsList().size());
    }
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.