Class MappingUtils

java.lang.Object
org.springframework.data.aerospike.core.MappingUtils

public class MappingUtils extends Object
A utility class providing methods for entity mapping and persistence operations.
  • Method Details

    • getBinNamesFromTargetClassOrNull

      public static String[] getBinNamesFromTargetClassOrNull(@Nullable Class<?> entityClass, @Nullable Class<?> targetClass, MappingContext<BasicAerospikePersistentEntity<?>,AerospikePersistentProperty> mappingContext)
      Retrieves an array of bin names from target class, if it is specified and differs from the given entity class, otherwise returns null.
      Parameters:
      entityClass - The primary class of the entity. Can be null
      targetClass - An optional alternative target class. Can be null
      mappingContext - The mapping context used to retrieve persistent entity information
      Returns:
      An array of bin names from the target class, or null if no distinct target class is used
    • getBinNamesFromTargetClass

      public static String[] getBinNamesFromTargetClass(Class<?> targetClass, MappingContext<BasicAerospikePersistentEntity<?>,AerospikePersistentProperty> mappingContext)
      Retrieves an array of bin names for a given target class based on its persistent properties. This method iterates through the properties of the target entity and collects their field names, excluding the ID property.
      Parameters:
      targetClass - The class for which to retrieve bin names
      mappingContext - The mapping context used to retrieve persistent entity information
      Returns:
      An array of strings representing the bin names associated with the target class's properties
    • getBinNamesListFromTargetClass

      public static List<String> getBinNamesListFromTargetClass(Class<?> targetClass, MappingContext<BasicAerospikePersistentEntity<?>,AerospikePersistentProperty> mappingContext)
      Retrieves a list of bin names for a given target class based on its persistent properties. This method iterates through the properties of the target entity and collects their field names, excluding the ID property.
      Parameters:
      targetClass - The class for which to retrieve bin names
      mappingContext - The mapping context used to retrieve persistent entity information
      Returns:
      A list of strings representing the bin names associated with the target class's properties