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 long
count()
Query the number of rows in this table.DeleteStatement
delete()
Create a new delete statement.boolean
equals(java.lang.Object other)
DatabaseObject.DbObjectStatus
existsInDatabase()
Query the existence of this database object.java.lang.String
getName()
Retrieve the name of the database object represented by the Java object.Schema
getSchema()
Retrieve the schema owning this database object.Session
getSession()
Retrieve the session owning the given schema object.int
hashCode()
InsertStatement
insert()
Create an insert statement using the list of all columns in the table.InsertStatement
insert(java.lang.String... fields)
Create an insert statement using the given list columns.InsertStatement
insert(java.util.Map<java.lang.String,java.lang.Object> fieldsAndValues)
Create an insert statement using the given key/value pairs.boolean
isView()
Check if the underlying object is a view or not.SelectStatement
select(java.lang.String... projection)
Create a new select statement using the given projections.void
setView(boolean isView)
Set flag indicating if the underlying object is a view.java.lang.String
toString()
UpdateStatement
update()
Create a new update statement.
-
Method Details
-
getSession
Description copied from interface:DatabaseObject
Retrieve the session owning the given schema object.- Specified by:
getSession
in interfaceDatabaseObject
- Returns:
Session
-
getSchema
Description copied from interface:DatabaseObject
Retrieve the schema owning this database object.- Specified by:
getSchema
in interfaceDatabaseObject
- Returns:
Schema
-
getName
public java.lang.String getName()Description copied from interface:DatabaseObject
Retrieve the name of the database object represented by the Java object.- Specified by:
getName
in interfaceDatabaseObject
- Returns:
- name
-
existsInDatabase
Description copied from interface:DatabaseObject
Query the existence of this database object.- Specified by:
existsInDatabase
in interfaceDatabaseObject
- Returns:
DatabaseObject.DbObjectStatus
-
insert
Description copied from interface:Table
Create an insert statement using the list of all columns in the table.- Specified by:
insert
in interfaceTable
- Returns:
InsertStatement
-
insert
Description copied from interface:Table
Create an insert statement using the given list columns.- Specified by:
insert
in interfaceTable
- Parameters:
fields
- one or more projection expressions- Returns:
InsertStatement
-
insert
Description copied from interface:Table
Create an insert statement using the given key/value pairs.- Specified by:
insert
in interfaceTable
- Parameters:
fieldsAndValues
- table name-value pairs- Returns:
InsertStatement
-
select
Description copied from interface:Table
Create a new select statement using the given projections.- Specified by:
select
in interfaceTable
- Parameters:
projection
- one or more projection expressions- Returns:
SelectStatement
-
update
Description copied from interface:Table
Create a new update statement.- Specified by:
update
in interfaceTable
- Returns:
UpdateStatement
-
delete
Description copied from interface:Table
Create a new delete statement.- Specified by:
delete
in interfaceTable
- Returns:
DeleteStatement
-
count
public long count()Description copied from interface:Table
Query the number of rows in this table. -
equals
public boolean equals(java.lang.Object other)- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
isView
public boolean isView()Description copied from interface:Table
Check 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
-