org.opennms.netmgt.dao.db
Class Index

java.lang.Object
  extended by org.opennms.netmgt.dao.db.Index

public class Index
extends Object

Index class.

Version:
$Id: $
Author:
ranger

Constructor Summary
Index(String name, String table, String using, List<String> columns, boolean unique, String where)
          Constructor for Index.
 
Method Summary
 void addToDatabase(Connection connection)
          addToDatabase
static Index findIndexInString(String create)
          findIndexInString
 List<String> getColumns()
          getColumns
 String getIndexUniquenessQuery()
          getIndexUniquenessQuery
 String getName()
          getName
 String getSql()
          getSql
 String getTable()
          getTable
 boolean isOnDatabase(Connection connection)
          isOnDatabase
 boolean isUnique()
          isUnique
 void removeFromDatabase(Connection connection)
          removeFromDatabase
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Index

public Index(String name,
             String table,
             String using,
             List<String> columns,
             boolean unique,
             String where)

Constructor for Index.

Parameters:
name - a String object.
table - a String object.
using - a String object.
columns - a List object.
unique - a boolean.
where - a String object.
Method Detail

findIndexInString

public static Index findIndexInString(String create)

findIndexInString

Parameters:
create - a String object.
Returns:
a Index object.

isOnDatabase

public boolean isOnDatabase(Connection connection)
                     throws SQLException

isOnDatabase

Parameters:
connection - a Connection object.
Returns:
a boolean.
Throws:
SQLException - if any.

removeFromDatabase

public void removeFromDatabase(Connection connection)
                        throws SQLException

removeFromDatabase

Parameters:
connection - a Connection object.
Throws:
SQLException - if any.

addToDatabase

public void addToDatabase(Connection connection)
                   throws SQLException

addToDatabase

Parameters:
connection - a Connection object.
Throws:
SQLException - if any.

getSql

public String getSql()

getSql

Returns:
a String object.

getName

public String getName()

getName

Returns:
a String object.

getTable

public String getTable()

getTable

Returns:
a String object.

isUnique

public boolean isUnique()

isUnique

Returns:
a boolean.

getColumns

public List<String> getColumns()

getColumns

Returns:
a List object.

getIndexUniquenessQuery

public String getIndexUniquenessQuery()
                               throws Exception

getIndexUniquenessQuery

Returns:
a String object.
Throws:
Exception - if any.


Copyright © 2011. All Rights Reserved.