Class CustomWrapperSchemaParameter

java.lang.Object
com.denodo.vdb.engine.customwrapper.CustomWrapperSchemaParameter

public final class CustomWrapperSchemaParameter extends Object
Defines a Custom Wrapper's schema parameter. Schema parameters have the following characteristics:
  • They can be simple or compound (in the latter case they will contain a CustomWrapperSchemaParameter[]).
  • They can be of any of the types defined in Types, including java.sql.Types.ARRAY and java.sql.Types.STRUCT, in case they are compound.
  • They can be sortable, searchable, updateable, nullable and mandatory.
  • Field Details

    • NOT_SORTABLE

      public static final int NOT_SORTABLE
      This parameter cannot be sorted.
      See Also:
    • ASCENDING_SORT

      public static final int ASCENDING_SORT
      This parameter supports ascending sort.
      See Also:
    • DESCENDING_SORT

      public static final int DESCENDING_SORT
      This parameter supports descending sort.
      See Also:
    • ASC_AND_DESC_SORT

      public static final int ASC_AND_DESC_SORT
      This parameter supports both ascending and descending sort.
      See Also:
  • Constructor Details

    • CustomWrapperSchemaParameter

      public CustomWrapperSchemaParameter(String name, int type, CustomWrapperSchemaParameter[] columns, boolean isSearchable, int sortableStatus, boolean isUpdateable, boolean isNullable, boolean isMandatory)
      Creates a schema parameter without any default property.
      Parameters:
      name - the name of this schema parameter
      type - one of the types defined in java.sql.Types.
      columns - an array of schema parameters, if this parameter is to be compound, or null otherwise.
      isSearchable - true if this parameter can be searched or false otherwise.
      sortableStatus - one of NOT_SORTABLE, ASCENDING_SORT, DESCENDING_SORT or ASC_AND_DESC_SORT.
      isUpdateable - true if this parameter can be updated or false otherwise.
      isNullable - true if this parameter can be made null or false otherwise.
      isMandatory - true if this parameter is mandatory or false otherwise. This parameter will be ignored if columns is not null.
    • CustomWrapperSchemaParameter

      public CustomWrapperSchemaParameter(String name, int type, Integer typeSize, String typeName, Integer typeRadix, Integer typeDecimals, Map<String,String> extraProperties, CustomWrapperSchemaParameter[] columns, boolean isSearchable, int sortableStatus, boolean isUpdateable, boolean isNullable, boolean isMandatory)
      Creates a schema parameter without any default property.
      Parameters:
      name - the name of this schema parameter
      type - one of the types defined in the class Types of the JDBC API.
      typeSize - its meaning depends on the type of the field:
      • For fields of type text, it indicates the maximum length of the field.
      • For numeric types, the precision. Therefore, for int and long fields, this number is 0.
      typeName - name of the type of the field in the source type properties of the field. E.g. VARCHAR, NCHAR, INTEGER, BIGINT, etc. These are the names of the constants defined in the class Types of the JDBC API.
      typeRadix - number of fractional digits that a value of this field could store.
      typeDecimals - for fields of type decimal, is the value of Type decimals of the source type properties of the field. Set this to 0, for fields that are not decimal.
      columns - an array of schema parameters, if this parameter is to be compound, or null otherwise.
      isSearchable - true if this parameter can be searched or false otherwise.
      sortableStatus - one of NOT_SORTABLE, ASCENDING_SORT, DESCENDING_SORT or ASC_AND_DESC_SORT.
      isUpdateable - true if this parameter can be updated or false otherwise.
      isNullable - true if this parameter can be made null or false otherwise.
      isMandatory - true if this parameter is mandatory or false otherwise. This parameter will be ignored if columns is not null.
    • CustomWrapperSchemaParameter

      public CustomWrapperSchemaParameter(String name, int type, CustomWrapperSchemaParameter[] columns)
      Creates a complex schema parameter with the following default properties:
      • not mandatory
      • not searchable
      • not updateable
      • not sortable
      • nullable
      Parameters:
      name - this schema parameter's name.
      type - this schema parameter's type (one of java.sql.Types).
      columns - an array of schema parameters, representing this parameter's sub-parameters.
    • CustomWrapperSchemaParameter

      public CustomWrapperSchemaParameter(String name, int type, Integer typeSize, String typeName, Integer typeRadix, Integer typeDecimals, Map<String,String> extraProperties, CustomWrapperSchemaParameter[] columns)
      Creates a complex schema parameter with the following default properties:
      • not mandatory
      • not searchable
      • not updateable
      • not sortable
      • nullable
      • properties
      Parameters:
      name - this schema parameter's name.
      type - this schema parameter's type (one of java.sql.Types).
      typeSize - its meaning depends on the type of the field:
      • For fields of type text, it indicates the maximum length of the field.
      • For numeric types, the precision. Therefore, for int and long fields, this number is 0.
      typeName - name of the type of the field in the source type properties of the field. E.g. VARCHAR, NCHAR, INTEGER, BIGINT, etc. These are the names of the constants defined in the class Types of the JDBC API.
      typeRadix - number of fractional digits that a value of this field could store.
      typeDecimals - for fields of type decimal, is the value of Type decimals of the source type properties of the field. Set this to 0, for fields that are not decimal.
      columns - an array of schema parameters, representing this parameter's sub-parameters.
    • CustomWrapperSchemaParameter

      public CustomWrapperSchemaParameter(String name, int type)
      Creates a simple schema parameter with the following default properties:
      • not mandatory
      • searchable
      • nullable
      • updateable
      • sortable (supports ascending and descending sort)
      • getColumns() returns null
      Parameters:
      name - this schema parameter's name.
      type - this schema parameter's type (one of java.sql.Types).
    • CustomWrapperSchemaParameter

      public CustomWrapperSchemaParameter(String name, int type, Integer typeSize, String typeName, Integer typeRadix, Integer typeDecimals, Map<String,String> extraProperties)
      Creates a simple schema parameter with the following default properties:
      • not mandatory
      • searchable
      • nullable
      • updateable
      • sortable (supports ascending and descending sort)
      • getColumns() returns null
      Parameters:
      name - this schema parameter's name.
      type - this schema parameter's type (one of constants defined in the class Types).
      typeSize - its meaning depends on the type of the field:
      • For fields of type text, it indicates the maximum length of the field.
      • For numeric types, the precision. Therefore, for int and long fields, this number is 0.
      typeName - name of the type of the field in the source type properties of the field. E.g. VARCHAR, NCHAR, INTEGER, BIGINT, etc. These are the names of the constants defined in the class Types of the JDBC API.
      typeRadix - number of fractional digits that a value of this field could store.
      typeDecimals - for fields of type decimal, is the value of Type decimals of the source type properties of the field. Set this to 0, for fields that are not decimal.
  • Method Details

    • getName

      public String getName()
      Returns:
      the name of this schema parameter
    • getType

      public int getType()
      Returns:
      one of the types defined in @{link Types}.
    • getTypeRadix

      public Integer getTypeRadix()
    • getTypeSize

      public Integer getTypeSize()
    • getTypeName

      public String getTypeName()
    • getTypeDecimals

      public Integer getTypeDecimals()
    • getColumns

      public CustomWrapperSchemaParameter[] getColumns()
      Returns:
      an array of schema parameters, if this parameter is compound.
    • isSearchable

      public boolean isSearchable()
      Returns:
      true if this parameter can be searched or false otherwise.
    • getSortableStatus

      public int getSortableStatus()
      Returns:
      one of NOT_SORTABLE, ASCENDING_SORT, DESCENDING_SORT or ASC_AND_DESC_SORT.
    • isUpdateable

      public boolean isUpdateable()
      Returns:
      true if this parameter can be updated or false otherwise.
    • isNullable

      public boolean isNullable()
      Returns:
      true if this parameter can be made null or false otherwise.
    • isMandatory

      public boolean isMandatory()
      Returns:
      true if this parameter is mandatory or false otherwise.
    • getParameterClass

      public Class<?> getParameterClass()
      Obtains the Java class of this schema parameter according to its type. The relation is as follows:
      • java.sql.Types.ARRAY = Object[]
      • java.sql.Types.BIGINT = Long
      • java.sql.Types.BINARY = Byte[]
      • java.sql.Types.BIT = Boolean
      • java.sql.Types.BLOB = Byte[]
      • java.sql.Types.BOOLEAN = Boolean
      • java.sql.Types.CHAR = Character
      • java.sql.Types.CLOB = Character[]
      • java.sql.Types.DATALINK = java.net.URL
      • java.sql.Types.DATE = java.sql.Date
      • java.sql.Types.DECIMAL = java.math.BigDecimal
      • java.sql.Types.DISTINCT = Object
      • java.sql.Types.DOUBLE = Double
      • java.sql.Types.FLOAT = Float
      • java.sql.Types.INTEGER = Integer
      • java.sql.Types.JAVA_OBJECT = Object
      • java.sql.Types.LONGVARBINARY = Byte[]
      • java.sql.Types.LONGVARCHAR = String
      • java.sql.Types.NUMERIC = java.math.BigDecimal
      • java.sql.Types.REAL = Double
      • java.sql.Types.SMALLINT = Integer
      • java.sql.Types.STRUCT = java.sql.Struct
      • java.sql.Types.TIME = java.sql.Time
      • java.sql.Types.TIMESTAMP = java.sql.Timestamp
      • java.sql.Types.TIMESTAMP_WITH_TIMEZONE = java.time.OffsetDateTime
      • java.sql.Types.TIME_WITH_TIMEZONE = java.time.OffsetTime
      • java.sql.Types.TIMESTAMP = java.sql.Timestamp
      • java.sql.Types.TINYINT = Integer
      • java.sql.Types.VARBINARY = Byte[]
      • java.sql.Types.VARCHAR = String
      Returns:
      the Java class of this schema parameter according to its type.
    • setExtraProperties

      public void setExtraProperties(Map<String,String> extraProperties)
    • getExtraProperties

      public Map<String,String> getExtraProperties()
    • toString

      public String toString()
      Overrides:
      toString in class Object