Package com.mysql.cj.xdevapi
Class TableImpl
java.lang.Object
com.mysql.cj.xdevapi.TableImpl
- All Implemented Interfaces:
DatabaseObject,Table
public class TableImpl extends java.lang.Object implements Table
Table implementation-
Nested Class Summary
Nested classes/interfaces inherited from interface com.mysql.cj.xdevapi.DatabaseObject
DatabaseObject.DbObjectStatus, DatabaseObject.DbObjectType -
Method Summary
Modifier and Type Method Description longcount()Query the number of rows in this table.DeleteStatementdelete()Create a new delete statement.booleanequals(java.lang.Object other)DatabaseObject.DbObjectStatusexistsInDatabase()Query the existence of this database object.java.lang.StringgetName()Retrieve the name of the database object represented by the Java object.SchemagetSchema()Retrieve the schema owning this database object.SessiongetSession()Retrieve the session owning the given schema object.inthashCode()InsertStatementinsert()Create an insert statement using the list of all columns in the table.InsertStatementinsert(java.lang.String... fields)Create an insert statement using the given list columns.InsertStatementinsert(java.util.Map<java.lang.String,java.lang.Object> fieldsAndValues)Create an insert statement using the given key/value pairs.booleanisView()Check if the underlying object is a view or not.SelectStatementselect(java.lang.String... projection)Create a new select statement using the given projections.voidsetView(boolean isView)Set flag indicating if the underlying object is a view.java.lang.StringtoString()UpdateStatementupdate()Create a new update statement.
-
Method Details
-
getSession
Description copied from interface:DatabaseObjectRetrieve the session owning the given schema object.- Specified by:
getSessionin interfaceDatabaseObject- Returns:
Session
-
getSchema
Description copied from interface:DatabaseObjectRetrieve the schema owning this database object.- Specified by:
getSchemain interfaceDatabaseObject- Returns:
Schema
-
getName
public java.lang.String getName()Description copied from interface:DatabaseObjectRetrieve the name of the database object represented by the Java object.- Specified by:
getNamein interfaceDatabaseObject- Returns:
- name
-
existsInDatabase
Description copied from interface:DatabaseObjectQuery the existence of this database object.- Specified by:
existsInDatabasein interfaceDatabaseObject- Returns:
DatabaseObject.DbObjectStatus
-
insert
Description copied from interface:TableCreate an insert statement using the list of all columns in the table.- Specified by:
insertin interfaceTable- Returns:
InsertStatement
-
insert
Description copied from interface:TableCreate an insert statement using the given list columns.- Specified by:
insertin interfaceTable- Parameters:
fields- one or more projection expressions- Returns:
InsertStatement
-
insert
Description copied from interface:TableCreate an insert statement using the given key/value pairs.- Specified by:
insertin interfaceTable- Parameters:
fieldsAndValues- table name-value pairs- Returns:
InsertStatement
-
select
Description copied from interface:TableCreate a new select statement using the given projections.- Specified by:
selectin interfaceTable- Parameters:
projection- one or more projection expressions- Returns:
SelectStatement
-
update
Description copied from interface:TableCreate a new update statement.- Specified by:
updatein interfaceTable- Returns:
UpdateStatement
-
delete
Description copied from interface:TableCreate a new delete statement.- Specified by:
deletein interfaceTable- Returns:
DeleteStatement
-
count
public long count()Description copied from interface:TableQuery the number of rows in this table. -
equals
public boolean equals(java.lang.Object other)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
isView
public boolean isView()Description copied from interface:TableCheck if the underlying object is a view or not. -
setView
public void setView(boolean isView)Set flag indicating if the underlying object is a view.- Parameters:
isView- true if it is a View
-