Klasse Table

java.lang.Object
org.avertox.MySQL.Table
Alle implementierten Schnittstellen:
DatabaseOperations

public class Table extends Object implements DatabaseOperations
  • Konstruktordetails

    • Table

      public Table(MySQLHandler handler, String name, StructureColumn[] rowStructure)
      Parameter:
      handler - MySQLHandler instance
      name - The Name of the Table
      rowStructure - List of StructureColumns witch defines how the Columns are ordered in the Rows
  • Methodendetails

    • addRow

      public void addRow(Row row)
    • getName

      public String getName()
    • getRowStructure

      public StructureColumn[] getRowStructure()
    • getHandler

      public MySQLHandler getHandler()
    • getRows

      public List<Row> getRows()
    • insertRow

      public void insertRow(Object... data)
      Insert
    • insertEmptyRow

      public void insertEmptyRow()
    • updateData

      public void updateData(Column whereColumn, String targetColumnName, Object targetData)
      Parameter:
      whereColumn - Search for a row in the table in witch contains this Column
      targetColumnName - Name of the Column witch should be updated
      targetData - Data for the update
    • updateData

      public void updateData(Column whereColumn)
    • readDataList

      public List<Object> readDataList(String targetColumn)
      Parameter:
      targetColumn - Name of the Column witch should be returned
      Gibt zurück:
      List of Objects witch column names are targetColumn
    • readData

      public Object readData(Column whereColumn, String targetColumn)
      Parameter:
      whereColumn - The specific Column witch should be in the same row as the Target
      targetColumn - The Name the Column witch data is requested
      Gibt zurück:
      The data witch is stored in the targetColumn
    • readData

      public Object readData(Column whereColumn1, Column whereColumn2, String targetColumn)
      Parameter:
      whereColumn1 - The specific Column witch should be in the same row as the Target
      whereColumn2 - The specific Column witch should be in the same row as the Target
      targetColumn - The Name the Column witch data is requested
      Gibt zurück:
      The data witch is stored in the targetColumn
    • readData

      public List<Object> readData(String targetColumn)
      Parameter:
      targetColumn -
      Gibt zurück:
    • containsData

      public boolean containsData(Object data)
      Uitils
    • containsColumn

      public boolean containsColumn(Row row, Column checkColumn)
    • deleteRow

      public boolean deleteRow(Column firstWhereColumn, Column secondWhereColumn)
      Delete
      Angegeben von:
      deleteRow in Schnittstelle DatabaseOperations
      Parameter:
      firstWhereColumn - The specific column witch should be in the same row with should be deleted
      secondWhereColumn - The specific column witch should be in the same row with should be deleted
      Gibt zurück:
      true if the columns could be deleted false if not
    • deleteRows

      public boolean deleteRows(Column whereColumn)
      Angegeben von:
      deleteRows in Schnittstelle DatabaseOperations
      Parameter:
      whereColumn - The specific column witch should be in the same row as the target
      Gibt zurück:
      true if the rows could be deleted false if not
    • containsColumn

      public boolean containsColumn(Column whereColumn)
      Angegeben von:
      containsColumn in Schnittstelle DatabaseOperations
      Parameter:
      whereColumn - The specific column witch should be checked
      Gibt zurück:
      true if the lkk
    • readData

      public Object readData(Column whereColumn, StructureColumn targetColumn)
      Angegeben von:
      readData in Schnittstelle DatabaseOperations
      Parameter:
      whereColumn - The specific Column witch should be in the same row as the Target
      targetColumn - The Name and Datatype of the Column witch data is requested
      Gibt zurück:
      The data witch is stored in the targetColumn
    • readColumns

      public List<Column> readColumns(Column whereColumn)
      Angegeben von:
      readColumns in Schnittstelle DatabaseOperations
      Parameter:
      whereColumn - The specific Column witch should be in the same row as the Target
      Gibt zurück:
      List of Columns
    • readRows

      public List<Row> readRows()
      Angegeben von:
      readRows in Schnittstelle DatabaseOperations
      Gibt zurück:
      List of Rows
    • readRows

      public List<Row> readRows(Column whereColumn)
      Parameter:
      whereColumn - The specific Column witch should be in the same row as the Target
      Gibt zurück:
      List of Rows
    • updateData

      public boolean updateData(Column whereColumn, Column targetColumn)
      Angegeben von:
      updateData in Schnittstelle DatabaseOperations
      Parameter:
      whereColumn - The specific column witch should be in the same row as the target
      targetColumn - The column witch should be updated
      Gibt zurück:
      True if the update was successful false if not
    • updateColumns

      public boolean updateColumns(Column whereColumn, List<Column> columns)
      Angegeben von:
      updateColumns in Schnittstelle DatabaseOperations
      Parameter:
      whereColumn - The specific column witch should be in the same row as the target
      columns - The columns witch should be updated
      Gibt zurück:
      True if the update was successful false if not
    • updateRows

      public boolean updateRows(List<Row> rows)
      Angegeben von:
      updateRows in Schnittstelle DatabaseOperations
      Parameter:
      rows - The rows witch should be updated
      Gibt zurück:
      True if the update was successful false if not
    • updateMySQL

      public boolean updateMySQL(Column whereColumn, List<Column> targetColumns)