Uses of Interface
is.codion.framework.domain.entity.Entity.Builder
Packages that use Entity.Builder
Package
Description
Package configuration values:
EntityValidator.STRICT_VALIDATION
Entities.VALIDATE_FOREIGN_KEYS
Entities.STRICT_DESERIALIZATION
AttributeDefinition.FRACTION_DIGITSAttributeDefinition.NUMBER_GROUPINGAttributeDefinition.GROUPING_SEPARATORAttributeDefinition.DECIMAL_SEPARATORAttributeDefinition.LEXICAL_STRING_COMPARATORAttributeDefinition.ROUNDING_MODEForeignKeyDefinition.REFERENCE_DEPTH
-
Uses of Entity.Builder in is.codion.framework.domain.entity
Methods in is.codion.framework.domain.entity that return Entity.BuilderModifier and TypeMethodDescriptionstatic Entity.BuilderEntity.builder(Entity.Key key) Entity.Copy.builder()Returns a newEntity.Builderinstance initialized with the values and original values from this entity.Removes the value of the given attribute from this builder, including both the current value and any original value being tracked.Entity.Builder.clearPrimaryKey()Removes all primary key values from this builder, including both current values and any original values being tracked.Entities.entity(EntityType entityType) Creates a newEntity.Builderinstance for the given entityTypeEntities entities = domain.entities(); // Build an entity with initial values Entity customer = entities.entity(Customer.TYPE) .with(Customer.NAME, "John Doe") .with(Customer.EMAIL, "john@example.com") .with(Customer.ACTIVE, true) .build(); // Build with a foreign key reference Entity order = entities.entity(Order.TYPE) .with(Order.CUSTOMER_FK, customer) .with(Order.DATE, LocalDate.now()) .with(Order.TOTAL, 100.50) .build();Entity.Builder.original()Resets all modified attributes to their original values and discards the corresponding modification tracking, so the resulting entity will not beEntity.modified()for those attributes.Entity.Builder.originalPrimaryKey()Resets the primary key columns to their original values and discards the corresponding modification tracking.<T> Entity.BuilderSets the given attribute value, overriding any previous value supplied via this method for the same attribute.Entity.Builder.withDefaults()Sets the default value for all attributes which have a default value, as ifwith(Attribute, Object)had been called for each one.