java.lang.Object
de.aristaflow.adept2.model.logmanagement.Schema
All Implemented Interfaces:
Serializable

public class Schema extends Object implements Serializable
A Schema defines an ordered set of columns and is used in the log manager to describe the structure of logs complex columns and Log.read(de.aristaflow.adept2.base.sessionmanagement.SessionToken, String, String, int, String...)
Author:
Patrick Schmidt
See Also:
  • Constructor Details

    • Schema

      public Schema(Column... columns)
      Constructs a new Schema with the specified columns.
      Parameters:
      columns - the columns of this schema
  • Method Details

    • getColumnCount

      public int getColumnCount()
      Returns the number of columns in this schema.
      Returns:
      the number of columns in this schema
    • getColumn

      public Column getColumn(int index)
      Returns the column at the specified index.
      Parameters:
      index - the desired index
      Returns:
      the column at the specified index
    • indexOfColumn

      public int indexOfColumn(String columnName)
      Returns the index of the column with the specified name or -1 if no such column exists.
      Parameters:
      columnName - the column name being looked for
      Returns:
      the index of the column with the specified name or -1 if no such column exists
    • getColumn

      public Column getColumn(String columnName)
      Returns the column with the specified name or null if no such column exists.
      Parameters:
      columnName - the column name being looked for
      Returns:
      the column with the specified name
    • getColumnRecursively

      public List<Column> getColumnRecursively(String columnName)
      Returns the column with the specified name recursively or the empty list if no such column exists. Note, that a breadth-first algorithm is applied. If the same column name is re-used in a sub-schema, the method will always return the path to the parent schema and not to the path to a sub-schema.
      Parameters:
      columnName - the column name being looked for
      Returns:
      The column with the specified name and the way through the schema. This will be the empty list if no column of the designated name is found.
    • getColumns

      public Column[] getColumns()
      Returns all columns of this schema.
      Returns:
      all columns of this schema
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object