Class StringCollectionDescriptor

java.lang.Object
org.hibernate.type.descriptor.java.AbstractTypeDescriptor<StringCollectionDescriptor.StringCollection>
google.registry.persistence.converter.StringCollectionDescriptor
All Implemented Interfaces:
Serializable, org.hibernate.type.descriptor.java.BasicJavaDescriptor<StringCollectionDescriptor.StringCollection>, org.hibernate.type.descriptor.java.JavaTypeDescriptor<StringCollectionDescriptor.StringCollection>, org.hibernate.type.descriptor.sql.SqlTypeDescriptor

public class StringCollectionDescriptor extends org.hibernate.type.descriptor.java.AbstractTypeDescriptor<StringCollectionDescriptor.StringCollection> implements org.hibernate.type.descriptor.sql.SqlTypeDescriptor
The JavaTypeDescriptor and SqlTypeDescriptor for StringCollectionDescriptor.StringCollection.

A StringCollectionDescriptor.StringCollection object is a simple wrapper for a Collection<String> which can be stored as a string array in the database. The JavaTypeDescriptor and SqlTypeDescriptor is used by JPA/Hibernate to map between the collection and Array which is the actual type that JDBC uses to read from and write to the database.

See Also:
  • Field Details

  • Constructor Details

    • StringCollectionDescriptor

      protected StringCollectionDescriptor()
  • Method Details

    • getInstance

      public static StringCollectionDescriptor getInstance()
    • fromString

      Specified by:
      fromString in interface org.hibernate.type.descriptor.java.JavaTypeDescriptor<StringCollectionDescriptor.StringCollection>
    • unwrap

      public <X> X unwrap(StringCollectionDescriptor.StringCollection value, Class<X> type, org.hibernate.type.descriptor.WrapperOptions options)
      Specified by:
      unwrap in interface org.hibernate.type.descriptor.java.JavaTypeDescriptor<StringCollectionDescriptor.StringCollection>
    • wrap

      public <X> StringCollectionDescriptor.StringCollection wrap(X value, org.hibernate.type.descriptor.WrapperOptions options)
      Specified by:
      wrap in interface org.hibernate.type.descriptor.java.JavaTypeDescriptor<StringCollectionDescriptor.StringCollection>
    • getJdbcRecommendedSqlType

      public org.hibernate.type.descriptor.sql.SqlTypeDescriptor getJdbcRecommendedSqlType(org.hibernate.type.descriptor.spi.JdbcRecommendedSqlTypeMappingContext context)
      Specified by:
      getJdbcRecommendedSqlType in interface org.hibernate.type.descriptor.java.BasicJavaDescriptor<StringCollectionDescriptor.StringCollection>
    • getSqlType

      public int getSqlType()
      Specified by:
      getSqlType in interface org.hibernate.type.descriptor.sql.SqlTypeDescriptor
    • canBeRemapped

      public boolean canBeRemapped()
      Specified by:
      canBeRemapped in interface org.hibernate.type.descriptor.sql.SqlTypeDescriptor
    • getBinder

      public <X> org.hibernate.type.descriptor.ValueBinder<X> getBinder(org.hibernate.type.descriptor.java.JavaTypeDescriptor<X> javaTypeDescriptor)
      Specified by:
      getBinder in interface org.hibernate.type.descriptor.sql.SqlTypeDescriptor
    • getExtractor

      public <X> org.hibernate.type.descriptor.ValueExtractor<X> getExtractor(org.hibernate.type.descriptor.java.JavaTypeDescriptor<X> javaTypeDescriptor)
      Specified by:
      getExtractor in interface org.hibernate.type.descriptor.sql.SqlTypeDescriptor