Class BatchUpdateQueryHelper<E>

java.lang.Object
org.seasar.doma.jdbc.query.BatchUpdateQueryHelper<E>
Type Parameters:
E - the entity type

public class BatchUpdateQueryHelper<E> extends Object
A helper class for batch update queries. This class provides utility methods for handling entity properties in batch update operations.
  • Field Details

    • config

      protected final Config config
      The configuration.
    • entityType

      protected final EntityType<E> entityType
      The entity type.
    • versionIgnored

      protected final boolean versionIgnored
      Whether the version property is ignored.
    • optimisticLockExceptionSuppressed

      protected final boolean optimisticLockExceptionSuppressed
      Whether the optimistic lock exception is suppressed.
    • includedPropertyNames

      protected final String[] includedPropertyNames
      The included property names.
    • excludedPropertyNames

      protected final String[] excludedPropertyNames
      The excluded property names.
  • Constructor Details

    • BatchUpdateQueryHelper

      public BatchUpdateQueryHelper(Config config, EntityType<E> entityType, String[] includedPropertyNames, String[] excludedPropertyNames, boolean versionIgnored, boolean optimisticLockExceptionSuppressed)
      Constructs a new BatchUpdateQueryHelper.
      Parameters:
      config - the configuration
      entityType - the entity type
      includedPropertyNames - the included property names
      excludedPropertyNames - the excluded property names
      versionIgnored - whether the version property is ignored
      optimisticLockExceptionSuppressed - whether the optimistic lock exception is suppressed
  • Method Details

    • getTargetPropertyTypes

      public List<EntityPropertyType<E,?>> getTargetPropertyTypes()
      Returns the target property types for the update operation. This method filters the entity property types based on various criteria.
      Returns:
      the list of target property types
    • isTargetPropertyName

      protected boolean isTargetPropertyName(String name)
      Determines if the property name is a target for the update operation. This method checks if the property name is included and not excluded.
      Parameters:
      name - the property name
      Returns:
      true if the property name is a target, false otherwise
    • populateValues

      public void populateValues(E entity, List<EntityPropertyType<E,?>> targetPropertyTypes, EntityPropertyType<E,?> versionPropertyType, SqlContext context)
      Populates the SQL context with values from the entity. This method appends SQL for setting column values in the update statement.
      Parameters:
      entity - the entity
      targetPropertyTypes - the target property types
      versionPropertyType - the version property type
      context - the SQL context