Class IndexDefinition

java.lang.Object
io.ebeaninternal.server.deploy.IndexDefinition

public final class IndexDefinition extends Object
Holds multiple column unique constraints defined for an entity.
  • Constructor Details

    • IndexDefinition

      public IndexDefinition(String[] columns, String name, boolean unique, io.ebean.annotation.Platform[] platforms, boolean concurrent, String definition)
      Create from Index annotation.
    • IndexDefinition

      public IndexDefinition(String name, String[] columns, boolean unique)
      Create from JPA Index.
    • IndexDefinition

      public IndexDefinition(String name, String[] columns)
      Create a unique constraint given the column names.
  • Method Details

    • isUniqueConstraint

      public boolean isUniqueConstraint()
      Return true if this can be used as a unique constraint.
    • isUnique

      public boolean isUnique()
      Return true if this is a unique constraint.
    • getName

      public String getName()
      Return the index name (can be null).
    • getColumns

      public String[] getColumns()
      Return the columns that make up this unique constraint.
    • getPlatforms

      public io.ebean.annotation.Platform[] getPlatforms()
      Return the platforms this index applies to.
    • isConcurrent

      public boolean isConcurrent()
      Return true if this index has the concurrent flag.
    • getDefinition

      public String getDefinition()
      Return the raw definition of the index if supplied.