use of com.google.api.ads.admanager.jaxws.v202205.ColumnType in project molgenis-emx2 by molgenis.
the class RefAndRefArrayTestExample method createRefAndRefArrayTestExample.
public static void createRefAndRefArrayTestExample(SchemaMetadata schema) {
ColumnType[] columnTypes = new ColumnType[] { UUID, STRING, BOOL, INT, DECIMAL, TEXT, DATE, DATETIME };
for (ColumnType columnType : columnTypes) {
String aTableName = columnType.toString() + "_A";
String fieldName = "AKeyOf" + columnType;
schema.create(table(aTableName).add(column(fieldName).setType(columnType).setPkey()));
String bTableName = columnType.toString() + "_B";
String refFromBToA = "RefToAKeyOf" + columnType;
String refArrayFromBToA = "RefArrayToAKeyOf" + columnType;
schema.create(table(bTableName).add(column(refFromBToA).setType(REF).setRefTable(aTableName)).add(column(refArrayFromBToA).setType(REF_ARRAY).setRefTable(aTableName)));
}
}
use of com.google.api.ads.admanager.jaxws.v202205.ColumnType in project molgenis-emx2 by molgenis.
the class SimpleTypeTestExample method createSimpleTypeTest.
public static void createSimpleTypeTest(SchemaMetadata schema) {
TableMetadata typeTestTable = table(TYPE_TEST).add(column("id").setPkey());
ColumnType[] columnTypes = new ColumnType[] { UUID, STRING, BOOL, INT, LONG, DECIMAL, TEXT, DATE, DATETIME };
for (ColumnType columnType : columnTypes) {
typeTestTable.add(column("Test " + columnType.toString().toLowerCase()).setType(columnType).setRequired(true));
typeTestTable.add(column("Test " + columnType.toString().toLowerCase() + " nillable").setType(columnType));
}
schema.create(typeTestTable);
}
Aggregations