@Override public InterfaceField set(Type type) { f.set(type); return this; }
@Override public InterfaceField set(Value<?> val) { f.set(val); return this; }
@Override public InterfaceField set(Javadoc doc) { f.set(doc); doc.setParent(this); return this; }
/** * Creates a public final static {@link Field} with the specified value and * adds it to this model. * * @param name the name of the field * @param type the type of the field * @param value the value of the field * @return a reference to this * * @since 2.5 */ default T constant(final String name, Type type, Value<?> value) { return add(Field.of(name, type) .public_().final_().static_() .set(value) ); }
initializer.add("return " + STRING_BUILDER_NAME + ".toString();"); metadataField.set(Value.ofReference("init()")); getMetadata.add("return Optional.of(METADATA);");
"IDENTIFIER", SimpleParameterizedType.create(TableIdentifier.class, getSupport().entityType()) ).set(Value.ofInvocation(TableIdentifier.class, "of", Stream.<HasAlias>of( table.getParentOrThrow().getParentOrThrow(), com.speedment.runtime.field.Field.class, getSupport().entityType()) )).set(Value.ofReference("unmodifiableList(asList(" + nl() + indent( table.columns() .sorted(comparing(Column::getOrdinalPosition))
.map(InvocationValue.class::cast); field.set(ofInvocation( existing.map(InvocationValue::getType).orElseGet( () -> fk.isPresent()
@Override public InterfaceField set(Value<?> val) { f.set(val); return this; }
@Override public InterfaceField set(Type type) { f.set(type); return this; }
@Override public InterfaceField set(Javadoc doc) { f.set(doc); return this; }
@Override public InterfaceField set(Type type) { f.set(type); return this; }
@Override public InterfaceField set(Value<?> val) { f.set(val); return this; }
@Override public InterfaceField set(Javadoc doc) { f.set(doc); doc.setParent(this); return this; }
/** * Creates a public final static {@link Field} with the specified value and * adds it to this model. * * @param name the name of the field * @param type the type of the field * @param value the value of the field * @return a reference to this * * @since 2.5 */ default T constant(final String name, Type type, Value<?> value) { return add(Field.of(name, type) .public_().final_().static_() .set(value) ); }
initializer.add("return " + STRING_BUILDER_NAME + ".toString();"); metadataField.set(Value.ofReference("init()")); getMetadata.add("return Optional.of(METADATA);");
"IDENTIFIER", SimpleParameterizedType.create(TableIdentifier.class, getSupport().entityType()) ).set(Value.ofInvocation(TableIdentifier.class, "of", Stream.<HasAlias>of( table.getParentOrThrow().getParentOrThrow(), com.speedment.runtime.field.Field.class, getSupport().entityType()) )).set(Value.ofReference("unmodifiableList(asList(" + nl() + indent( table.columns() .sorted(comparing(Column::getOrdinalPosition))