创建必要的数据表
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -111,3 +111,4 @@ buildNumber.properties
|
||||
|
||||
# Common working directory
|
||||
run/
|
||||
/database/
|
||||
78
pom.xml
78
pom.xml
@@ -41,6 +41,78 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.jooq</groupId>
|
||||
<artifactId>jooq-codegen-maven</artifactId>
|
||||
<!--下面这段不注释时,可以通过 mvn clean install 来生成代码-->
|
||||
<executions>
|
||||
<execution>
|
||||
<id>convergence</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
|
||||
<configuration>
|
||||
<jdbc>
|
||||
<!-- 数据库相关配置 -->
|
||||
<driver>org.sqlite.JDBC</driver>
|
||||
<url>jdbc:sqlite:database/database.db</url>
|
||||
<password></password>
|
||||
</jdbc>
|
||||
|
||||
<generator>
|
||||
<name>org.jooq.codegen.JavaGenerator</name>
|
||||
|
||||
<database>
|
||||
<!-- 数据库的基本信息 -->
|
||||
<name>org.jooq.meta.sqlite.SQLiteDatabase</name>
|
||||
<inputSchema/>
|
||||
<!-- 所有的表都包含进来,用于自动生成代码 -->
|
||||
<includes>Version|LocationNotepad</includes>
|
||||
<excludes></excludes>
|
||||
</database>
|
||||
|
||||
<generate>
|
||||
<pojos>true</pojos>
|
||||
</generate>
|
||||
|
||||
<target>
|
||||
<!-- 自动生成的类的包名,以及路径 -->
|
||||
<packageName>ling.database</packageName>
|
||||
<directory>src/main/java</directory>
|
||||
</target>
|
||||
|
||||
<strategy>
|
||||
<matchers>
|
||||
<tables>
|
||||
<table>
|
||||
<expression>^(.*)$</expression>
|
||||
<tableClass>
|
||||
<!-- table的后缀为TB -->
|
||||
<transform>PASCAL</transform>
|
||||
<expression>$1_T_B</expression>
|
||||
</tableClass>
|
||||
<recordClass>
|
||||
<!-- record的后缀为PO,表示实体类 -->
|
||||
<transform>PASCAL</transform>
|
||||
<expression>$1_P_O</expression>
|
||||
</recordClass>
|
||||
<pojoClass>
|
||||
<!-- pojo后缀为BO,作为内部使用的简单对象-->
|
||||
<transform>PASCAL</transform>
|
||||
<expression>$1_B_O</expression>
|
||||
</pojoClass>
|
||||
</table>
|
||||
</tables>
|
||||
</matchers>
|
||||
</strategy>
|
||||
</generator>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<resources>
|
||||
<resource>
|
||||
@@ -74,5 +146,11 @@
|
||||
<artifactId>sqlite-jdbc</artifactId>
|
||||
<version>3.43.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jooq</groupId>
|
||||
<artifactId>jooq</artifactId>
|
||||
<version>3.19.16</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -1,17 +1,42 @@
|
||||
package ling.coordinateRecorder;
|
||||
|
||||
import ling.coordinateRecorder.data.Database;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import java.sql.SQLException;
|
||||
|
||||
public final class CoordinateRecorder extends JavaPlugin {
|
||||
|
||||
private static CoordinateRecorder current;
|
||||
private static Database database;
|
||||
|
||||
private static void start() throws SQLException {
|
||||
database.installPlugin();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
// Plugin startup logic
|
||||
|
||||
current = this;
|
||||
try {
|
||||
database = new Database(this);
|
||||
start();
|
||||
getLogger().info("加载完毕");
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException("插件初始化失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
// Plugin shutdown logic
|
||||
}
|
||||
|
||||
public static CoordinateRecorder getCurrent() {
|
||||
return current;
|
||||
}
|
||||
|
||||
public static Database getDatabase() {
|
||||
return database;
|
||||
}
|
||||
}
|
||||
|
||||
106
src/main/java/ling/coordinateRecorder/data/Database.java
Normal file
106
src/main/java/ling/coordinateRecorder/data/Database.java
Normal file
@@ -0,0 +1,106 @@
|
||||
package ling.coordinateRecorder.data;
|
||||
|
||||
import ling.coordinateRecorder.CoordinateRecorder;
|
||||
import ling.database.tables.VersionTB;
|
||||
import ling.database.tables.records.VersionPO;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.jooq.DSLContext;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
|
||||
import java.io.File;
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.SQLException;
|
||||
|
||||
/// 用于提供数据库连接对象
|
||||
public class Database {
|
||||
protected final JavaPlugin plugin;
|
||||
protected final DSLContext ctx;
|
||||
public static final int VERSION = 1;
|
||||
public static final String VERSION_NAME = "V1.0";
|
||||
|
||||
public Database(JavaPlugin plugin) throws SQLException {
|
||||
this.plugin = plugin;
|
||||
File db = new File(plugin.getDataFolder(), "database.db");
|
||||
var connect = DriverManager.getConnection("jdbc:sqlite:" + db.getPath());
|
||||
ctx = DSL.using(connect);
|
||||
}
|
||||
|
||||
/// 获得一个数据库连接对象
|
||||
public Connection getDatabase() throws SQLException {
|
||||
File db = new File(plugin.getDataFolder(), "database.db");
|
||||
return DriverManager.getConnection("jdbc:sqlite:" + db.getPath());
|
||||
}
|
||||
|
||||
public DSLContext getDSL() throws SQLException {
|
||||
return ctx;
|
||||
}
|
||||
|
||||
protected VersionPO getVersion() {
|
||||
Record recordResult = ctx.select().from(VersionTB.VERSION).orderBy(VersionTB.VERSION.ID).limit(1).fetchOne();
|
||||
if (recordResult != null) {
|
||||
return recordResult.into(VersionPO.class);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
protected void createVersion() {
|
||||
if (ctx.meta().getTables("Version").isEmpty()) {
|
||||
ctx.createTable("Version")
|
||||
.column("ID", SQLDataType.INTEGER.identity(true))
|
||||
.column("version", SQLDataType.INTEGER.nullable(false))
|
||||
.column("versionName", SQLDataType.VARCHAR(32).nullable(false))
|
||||
.column("createTime", SQLDataType.BIGINTUNSIGNED.nullable(false))
|
||||
.constraint(DSL.primaryKey("ID"))
|
||||
.execute();
|
||||
}
|
||||
}
|
||||
|
||||
/// 创建其他表
|
||||
protected void createTable() {
|
||||
//玩家记录坐标点
|
||||
if (ctx.meta().getTables("LocationNotepad").isEmpty()) {
|
||||
ctx.createTable("LocationNotepad")
|
||||
.column("ID", SQLDataType.INTEGER.identity(true))
|
||||
.column("UID", SQLDataType.VARCHAR(64).nullable(false))
|
||||
.column("world", SQLDataType.VARCHAR(32).nullable(false))
|
||||
.column("name", SQLDataType.VARCHAR(64).nullable(false))
|
||||
.column("x", SQLDataType.INTEGER.nullable(false))
|
||||
.column("y", SQLDataType.INTEGER.nullable(false))
|
||||
.column("z", SQLDataType.INTEGER.nullable(false))
|
||||
.column("time", SQLDataType.BIGINTUNSIGNED.nullable(false))
|
||||
.column("isDelete", SQLDataType.BOOLEAN.nullable(false).default_(false))
|
||||
.execute();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// 初始化插件
|
||||
public void installPlugin() throws SQLException {
|
||||
if (!plugin.getDataFolder().exists()) {
|
||||
//noinspection ResultOfMethodCallIgnored
|
||||
plugin.getDataFolder().mkdirs();
|
||||
}
|
||||
createVersion();
|
||||
createTable();
|
||||
var version = getVersion();
|
||||
//数据库已经初始化
|
||||
if (version != null) {
|
||||
CoordinateRecorder.getCurrent().getLogger().info("数据库版本:" + version.getVersion() + "," + version.getVersionname());
|
||||
return;
|
||||
}
|
||||
ctx.insertInto(VersionTB.VERSION)
|
||||
.columns(
|
||||
VersionTB.VERSION.VERSION_,
|
||||
VersionTB.VERSION.VERSIONNAME,
|
||||
VersionTB.VERSION.CREATETIME
|
||||
).values(
|
||||
VERSION,
|
||||
VERSION_NAME,
|
||||
BigDecimal.valueOf(System.currentTimeMillis())
|
||||
).execute();
|
||||
}
|
||||
}
|
||||
54
src/main/java/ling/database/DefaultCatalog.java
Normal file
54
src/main/java/ling/database/DefaultCatalog.java
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ling.database;
|
||||
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.jooq.Constants;
|
||||
import org.jooq.Schema;
|
||||
import org.jooq.impl.CatalogImpl;
|
||||
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class DefaultCatalog extends CatalogImpl {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>DEFAULT_CATALOG</code>
|
||||
*/
|
||||
public static final DefaultCatalog DEFAULT_CATALOG = new DefaultCatalog();
|
||||
|
||||
/**
|
||||
* The schema <code>DEFAULT_SCHEMA</code>.
|
||||
*/
|
||||
public final DefaultSchema DEFAULT_SCHEMA = DefaultSchema.DEFAULT_SCHEMA;
|
||||
|
||||
/**
|
||||
* No further instances allowed
|
||||
*/
|
||||
private DefaultCatalog() {
|
||||
super("");
|
||||
}
|
||||
|
||||
@Override
|
||||
public final List<Schema> getSchemas() {
|
||||
return Arrays.asList(
|
||||
DefaultSchema.DEFAULT_SCHEMA
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* A reference to the 3.19 minor release of the code generator. If this
|
||||
* doesn't compile, it's because the runtime library uses an older minor
|
||||
* release, namely: 3.19. You can turn off the generation of this reference
|
||||
* by specifying /configuration/generator/generate/jooqVersionReference
|
||||
*/
|
||||
private static final String REQUIRE_RUNTIME_JOOQ_VERSION = Constants.VERSION_3_19;
|
||||
}
|
||||
61
src/main/java/ling/database/DefaultSchema.java
Normal file
61
src/main/java/ling/database/DefaultSchema.java
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ling.database;
|
||||
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import ling.database.tables.LocationnotepadTB;
|
||||
import ling.database.tables.VersionTB;
|
||||
|
||||
import org.jooq.Catalog;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.impl.SchemaImpl;
|
||||
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class DefaultSchema extends SchemaImpl {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>DEFAULT_SCHEMA</code>
|
||||
*/
|
||||
public static final DefaultSchema DEFAULT_SCHEMA = new DefaultSchema();
|
||||
|
||||
/**
|
||||
* The table <code>LocationNotepad</code>.
|
||||
*/
|
||||
public final LocationnotepadTB LOCATIONNOTEPAD = LocationnotepadTB.LOCATIONNOTEPAD;
|
||||
|
||||
/**
|
||||
* The table <code>Version</code>.
|
||||
*/
|
||||
public final VersionTB VERSION = VersionTB.VERSION;
|
||||
|
||||
/**
|
||||
* No further instances allowed
|
||||
*/
|
||||
private DefaultSchema() {
|
||||
super("", null);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Catalog getCatalog() {
|
||||
return DefaultCatalog.DEFAULT_CATALOG;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final List<Table<?>> getTables() {
|
||||
return Arrays.asList(
|
||||
LocationnotepadTB.LOCATIONNOTEPAD,
|
||||
VersionTB.VERSION
|
||||
);
|
||||
}
|
||||
}
|
||||
31
src/main/java/ling/database/Keys.java
Normal file
31
src/main/java/ling/database/Keys.java
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ling.database;
|
||||
|
||||
|
||||
import ling.database.tables.LocationnotepadTB;
|
||||
import ling.database.tables.VersionTB;
|
||||
import ling.database.tables.records.LocationnotepadPO;
|
||||
import ling.database.tables.records.VersionPO;
|
||||
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.Internal;
|
||||
|
||||
|
||||
/**
|
||||
* A class modelling foreign key relationships and constraints of tables in the
|
||||
* default schema.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class Keys {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// UNIQUE and PRIMARY KEY definitions
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
public static final UniqueKey<LocationnotepadPO> LOCATIONNOTEPAD__PK_LOCATIONNOTEPAD = Internal.createUniqueKey(LocationnotepadTB.LOCATIONNOTEPAD, DSL.name("pk_LocationNotepad"), new TableField[] { LocationnotepadTB.LOCATIONNOTEPAD.ID }, true);
|
||||
public static final UniqueKey<VersionPO> VERSION__PK_VERSION = Internal.createUniqueKey(VersionTB.VERSION, DSL.name("pk_Version"), new TableField[] { VersionTB.VERSION.ID }, true);
|
||||
}
|
||||
26
src/main/java/ling/database/Tables.java
Normal file
26
src/main/java/ling/database/Tables.java
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ling.database;
|
||||
|
||||
|
||||
import ling.database.tables.LocationnotepadTB;
|
||||
import ling.database.tables.VersionTB;
|
||||
|
||||
|
||||
/**
|
||||
* Convenience access to all tables in the default schema.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class Tables {
|
||||
|
||||
/**
|
||||
* The table <code>LocationNotepad</code>.
|
||||
*/
|
||||
public static final LocationnotepadTB LOCATIONNOTEPAD = LocationnotepadTB.LOCATIONNOTEPAD;
|
||||
|
||||
/**
|
||||
* The table <code>Version</code>.
|
||||
*/
|
||||
public static final VersionTB VERSION = VersionTB.VERSION;
|
||||
}
|
||||
265
src/main/java/ling/database/tables/LocationnotepadTB.java
Normal file
265
src/main/java/ling/database/tables/LocationnotepadTB.java
Normal file
@@ -0,0 +1,265 @@
|
||||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ling.database.tables;
|
||||
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Collection;
|
||||
|
||||
import ling.database.DefaultSchema;
|
||||
import ling.database.Keys;
|
||||
import ling.database.tables.records.LocationnotepadPO;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.Identity;
|
||||
import org.jooq.Name;
|
||||
import org.jooq.PlainSQL;
|
||||
import org.jooq.QueryPart;
|
||||
import org.jooq.SQL;
|
||||
import org.jooq.Schema;
|
||||
import org.jooq.Select;
|
||||
import org.jooq.Stringly;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.TableOptions;
|
||||
import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class LocationnotepadTB extends TableImpl<LocationnotepadPO> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>LocationNotepad</code>
|
||||
*/
|
||||
public static final LocationnotepadTB LOCATIONNOTEPAD = new LocationnotepadTB();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<LocationnotepadPO> getRecordType() {
|
||||
return LocationnotepadPO.class;
|
||||
}
|
||||
|
||||
/**
|
||||
* The column <code>LocationNotepad.ID</code>.
|
||||
*/
|
||||
public final TableField<LocationnotepadPO, Integer> ID = createField(DSL.name("ID"), SQLDataType.INTEGER.nullable(false).identity(true), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>LocationNotepad.UID</code>.
|
||||
*/
|
||||
public final TableField<LocationnotepadPO, String> UID = createField(DSL.name("UID"), SQLDataType.VARCHAR(64).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>LocationNotepad.world</code>.
|
||||
*/
|
||||
public final TableField<LocationnotepadPO, String> WORLD = createField(DSL.name("world"), SQLDataType.VARCHAR(32).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>LocationNotepad.name</code>.
|
||||
*/
|
||||
public final TableField<LocationnotepadPO, String> NAME = createField(DSL.name("name"), SQLDataType.VARCHAR(64).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>LocationNotepad.x</code>.
|
||||
*/
|
||||
public final TableField<LocationnotepadPO, Integer> X = createField(DSL.name("x"), SQLDataType.INTEGER.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>LocationNotepad.y</code>.
|
||||
*/
|
||||
public final TableField<LocationnotepadPO, Integer> Y = createField(DSL.name("y"), SQLDataType.INTEGER.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>LocationNotepad.z</code>.
|
||||
*/
|
||||
public final TableField<LocationnotepadPO, Integer> Z = createField(DSL.name("z"), SQLDataType.INTEGER.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>LocationNotepad.time</code>.
|
||||
*/
|
||||
public final TableField<LocationnotepadPO, BigDecimal> TIME = createField(DSL.name("time"), SQLDataType.NUMERIC.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>LocationNotepad.isDelete</code>.
|
||||
*/
|
||||
public final TableField<LocationnotepadPO, Boolean> ISDELETE = createField(DSL.name("isDelete"), SQLDataType.BOOLEAN.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BOOLEAN)), this, "");
|
||||
|
||||
private LocationnotepadTB(Name alias, Table<LocationnotepadPO> aliased) {
|
||||
this(alias, aliased, (Field<?>[]) null, null);
|
||||
}
|
||||
|
||||
private LocationnotepadTB(Name alias, Table<LocationnotepadPO> aliased, Field<?>[] parameters, Condition where) {
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>LocationNotepad</code> table reference
|
||||
*/
|
||||
public LocationnotepadTB(String alias) {
|
||||
this(DSL.name(alias), LOCATIONNOTEPAD);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>LocationNotepad</code> table reference
|
||||
*/
|
||||
public LocationnotepadTB(Name alias) {
|
||||
this(alias, LOCATIONNOTEPAD);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a <code>LocationNotepad</code> table reference
|
||||
*/
|
||||
public LocationnotepadTB() {
|
||||
this(DSL.name("LocationNotepad"), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : DefaultSchema.DEFAULT_SCHEMA;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identity<LocationnotepadPO, Integer> getIdentity() {
|
||||
return (Identity<LocationnotepadPO, Integer>) super.getIdentity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<LocationnotepadPO> getPrimaryKey() {
|
||||
return Keys.LOCATIONNOTEPAD__PK_LOCATIONNOTEPAD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocationnotepadTB as(String alias) {
|
||||
return new LocationnotepadTB(DSL.name(alias), this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocationnotepadTB as(Name alias) {
|
||||
return new LocationnotepadTB(alias, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocationnotepadTB as(Table<?> alias) {
|
||||
return new LocationnotepadTB(alias.getQualifiedName(), this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public LocationnotepadTB rename(String name) {
|
||||
return new LocationnotepadTB(DSL.name(name), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public LocationnotepadTB rename(Name name) {
|
||||
return new LocationnotepadTB(name, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public LocationnotepadTB rename(Table<?> name) {
|
||||
return new LocationnotepadTB(name.getQualifiedName(), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public LocationnotepadTB where(Condition condition) {
|
||||
return new LocationnotepadTB(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public LocationnotepadTB where(Collection<? extends Condition> conditions) {
|
||||
return where(DSL.and(conditions));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public LocationnotepadTB where(Condition... conditions) {
|
||||
return where(DSL.and(conditions));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public LocationnotepadTB where(Field<Boolean> condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public LocationnotepadTB where(SQL condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public LocationnotepadTB where(@Stringly.SQL String condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public LocationnotepadTB where(@Stringly.SQL String condition, Object... binds) {
|
||||
return where(DSL.condition(condition, binds));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public LocationnotepadTB where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||
return where(DSL.condition(condition, parts));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public LocationnotepadTB whereExists(Select<?> select) {
|
||||
return where(DSL.exists(select));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public LocationnotepadTB whereNotExists(Select<?> select) {
|
||||
return where(DSL.notExists(select));
|
||||
}
|
||||
}
|
||||
240
src/main/java/ling/database/tables/VersionTB.java
Normal file
240
src/main/java/ling/database/tables/VersionTB.java
Normal file
@@ -0,0 +1,240 @@
|
||||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ling.database.tables;
|
||||
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Collection;
|
||||
|
||||
import ling.database.DefaultSchema;
|
||||
import ling.database.Keys;
|
||||
import ling.database.tables.records.VersionPO;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.Identity;
|
||||
import org.jooq.Name;
|
||||
import org.jooq.PlainSQL;
|
||||
import org.jooq.QueryPart;
|
||||
import org.jooq.SQL;
|
||||
import org.jooq.Schema;
|
||||
import org.jooq.Select;
|
||||
import org.jooq.Stringly;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.TableOptions;
|
||||
import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class VersionTB extends TableImpl<VersionPO> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>Version</code>
|
||||
*/
|
||||
public static final VersionTB VERSION = new VersionTB();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<VersionPO> getRecordType() {
|
||||
return VersionPO.class;
|
||||
}
|
||||
|
||||
/**
|
||||
* The column <code>Version.ID</code>.
|
||||
*/
|
||||
public final TableField<VersionPO, Integer> ID = createField(DSL.name("ID"), SQLDataType.INTEGER.nullable(false).identity(true), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>Version.version</code>.
|
||||
*/
|
||||
public final TableField<VersionPO, Integer> VERSION_ = createField(DSL.name("version"), SQLDataType.INTEGER.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>Version.versionName</code>.
|
||||
*/
|
||||
public final TableField<VersionPO, String> VERSIONNAME = createField(DSL.name("versionName"), SQLDataType.VARCHAR(32).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>Version.createTime</code>.
|
||||
*/
|
||||
public final TableField<VersionPO, BigDecimal> CREATETIME = createField(DSL.name("createTime"), SQLDataType.NUMERIC.nullable(false), this, "");
|
||||
|
||||
private VersionTB(Name alias, Table<VersionPO> aliased) {
|
||||
this(alias, aliased, (Field<?>[]) null, null);
|
||||
}
|
||||
|
||||
private VersionTB(Name alias, Table<VersionPO> aliased, Field<?>[] parameters, Condition where) {
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>Version</code> table reference
|
||||
*/
|
||||
public VersionTB(String alias) {
|
||||
this(DSL.name(alias), VERSION);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>Version</code> table reference
|
||||
*/
|
||||
public VersionTB(Name alias) {
|
||||
this(alias, VERSION);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a <code>Version</code> table reference
|
||||
*/
|
||||
public VersionTB() {
|
||||
this(DSL.name("Version"), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : DefaultSchema.DEFAULT_SCHEMA;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identity<VersionPO, Integer> getIdentity() {
|
||||
return (Identity<VersionPO, Integer>) super.getIdentity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<VersionPO> getPrimaryKey() {
|
||||
return Keys.VERSION__PK_VERSION;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VersionTB as(String alias) {
|
||||
return new VersionTB(DSL.name(alias), this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VersionTB as(Name alias) {
|
||||
return new VersionTB(alias, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VersionTB as(Table<?> alias) {
|
||||
return new VersionTB(alias.getQualifiedName(), this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public VersionTB rename(String name) {
|
||||
return new VersionTB(DSL.name(name), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public VersionTB rename(Name name) {
|
||||
return new VersionTB(name, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public VersionTB rename(Table<?> name) {
|
||||
return new VersionTB(name.getQualifiedName(), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public VersionTB where(Condition condition) {
|
||||
return new VersionTB(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public VersionTB where(Collection<? extends Condition> conditions) {
|
||||
return where(DSL.and(conditions));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public VersionTB where(Condition... conditions) {
|
||||
return where(DSL.and(conditions));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public VersionTB where(Field<Boolean> condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public VersionTB where(SQL condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public VersionTB where(@Stringly.SQL String condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public VersionTB where(@Stringly.SQL String condition, Object... binds) {
|
||||
return where(DSL.condition(condition, binds));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public VersionTB where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||
return where(DSL.condition(condition, parts));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public VersionTB whereExists(Select<?> select) {
|
||||
return where(DSL.exists(select));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public VersionTB whereNotExists(Select<?> select) {
|
||||
return where(DSL.notExists(select));
|
||||
}
|
||||
}
|
||||
290
src/main/java/ling/database/tables/pojos/LocationnotepadBO.java
Normal file
290
src/main/java/ling/database/tables/pojos/LocationnotepadBO.java
Normal file
@@ -0,0 +1,290 @@
|
||||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ling.database.tables.pojos;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class LocationnotepadBO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer id;
|
||||
private String uid;
|
||||
private String world;
|
||||
private String name;
|
||||
private Integer x;
|
||||
private Integer y;
|
||||
private Integer z;
|
||||
private BigDecimal time;
|
||||
private Boolean isdelete;
|
||||
|
||||
public LocationnotepadBO() {}
|
||||
|
||||
public LocationnotepadBO(LocationnotepadBO value) {
|
||||
this.id = value.id;
|
||||
this.uid = value.uid;
|
||||
this.world = value.world;
|
||||
this.name = value.name;
|
||||
this.x = value.x;
|
||||
this.y = value.y;
|
||||
this.z = value.z;
|
||||
this.time = value.time;
|
||||
this.isdelete = value.isdelete;
|
||||
}
|
||||
|
||||
public LocationnotepadBO(
|
||||
Integer id,
|
||||
String uid,
|
||||
String world,
|
||||
String name,
|
||||
Integer x,
|
||||
Integer y,
|
||||
Integer z,
|
||||
BigDecimal time,
|
||||
Boolean isdelete
|
||||
) {
|
||||
this.id = id;
|
||||
this.uid = uid;
|
||||
this.world = world;
|
||||
this.name = name;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.time = time;
|
||||
this.isdelete = isdelete;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>LocationNotepad.ID</code>.
|
||||
*/
|
||||
public Integer getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>LocationNotepad.ID</code>.
|
||||
*/
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>LocationNotepad.UID</code>.
|
||||
*/
|
||||
public String getUid() {
|
||||
return this.uid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>LocationNotepad.UID</code>.
|
||||
*/
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>LocationNotepad.world</code>.
|
||||
*/
|
||||
public String getWorld() {
|
||||
return this.world;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>LocationNotepad.world</code>.
|
||||
*/
|
||||
public void setWorld(String world) {
|
||||
this.world = world;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>LocationNotepad.name</code>.
|
||||
*/
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>LocationNotepad.name</code>.
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>LocationNotepad.x</code>.
|
||||
*/
|
||||
public Integer getX() {
|
||||
return this.x;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>LocationNotepad.x</code>.
|
||||
*/
|
||||
public void setX(Integer x) {
|
||||
this.x = x;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>LocationNotepad.y</code>.
|
||||
*/
|
||||
public Integer getY() {
|
||||
return this.y;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>LocationNotepad.y</code>.
|
||||
*/
|
||||
public void setY(Integer y) {
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>LocationNotepad.z</code>.
|
||||
*/
|
||||
public Integer getZ() {
|
||||
return this.z;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>LocationNotepad.z</code>.
|
||||
*/
|
||||
public void setZ(Integer z) {
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>LocationNotepad.time</code>.
|
||||
*/
|
||||
public BigDecimal getTime() {
|
||||
return this.time;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>LocationNotepad.time</code>.
|
||||
*/
|
||||
public void setTime(BigDecimal time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>LocationNotepad.isDelete</code>.
|
||||
*/
|
||||
public Boolean getIsdelete() {
|
||||
return this.isdelete;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>LocationNotepad.isDelete</code>.
|
||||
*/
|
||||
public void setIsdelete(Boolean isdelete) {
|
||||
this.isdelete = isdelete;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
final LocationnotepadBO other = (LocationnotepadBO) obj;
|
||||
if (this.id == null) {
|
||||
if (other.id != null)
|
||||
return false;
|
||||
}
|
||||
else if (!this.id.equals(other.id))
|
||||
return false;
|
||||
if (this.uid == null) {
|
||||
if (other.uid != null)
|
||||
return false;
|
||||
}
|
||||
else if (!this.uid.equals(other.uid))
|
||||
return false;
|
||||
if (this.world == null) {
|
||||
if (other.world != null)
|
||||
return false;
|
||||
}
|
||||
else if (!this.world.equals(other.world))
|
||||
return false;
|
||||
if (this.name == null) {
|
||||
if (other.name != null)
|
||||
return false;
|
||||
}
|
||||
else if (!this.name.equals(other.name))
|
||||
return false;
|
||||
if (this.x == null) {
|
||||
if (other.x != null)
|
||||
return false;
|
||||
}
|
||||
else if (!this.x.equals(other.x))
|
||||
return false;
|
||||
if (this.y == null) {
|
||||
if (other.y != null)
|
||||
return false;
|
||||
}
|
||||
else if (!this.y.equals(other.y))
|
||||
return false;
|
||||
if (this.z == null) {
|
||||
if (other.z != null)
|
||||
return false;
|
||||
}
|
||||
else if (!this.z.equals(other.z))
|
||||
return false;
|
||||
if (this.time == null) {
|
||||
if (other.time != null)
|
||||
return false;
|
||||
}
|
||||
else if (!this.time.equals(other.time))
|
||||
return false;
|
||||
if (this.isdelete == null) {
|
||||
if (other.isdelete != null)
|
||||
return false;
|
||||
}
|
||||
else if (!this.isdelete.equals(other.isdelete))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((this.id == null) ? 0 : this.id.hashCode());
|
||||
result = prime * result + ((this.uid == null) ? 0 : this.uid.hashCode());
|
||||
result = prime * result + ((this.world == null) ? 0 : this.world.hashCode());
|
||||
result = prime * result + ((this.name == null) ? 0 : this.name.hashCode());
|
||||
result = prime * result + ((this.x == null) ? 0 : this.x.hashCode());
|
||||
result = prime * result + ((this.y == null) ? 0 : this.y.hashCode());
|
||||
result = prime * result + ((this.z == null) ? 0 : this.z.hashCode());
|
||||
result = prime * result + ((this.time == null) ? 0 : this.time.hashCode());
|
||||
result = prime * result + ((this.isdelete == null) ? 0 : this.isdelete.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("LocationnotepadBO (");
|
||||
|
||||
sb.append(id);
|
||||
sb.append(", ").append(uid);
|
||||
sb.append(", ").append(world);
|
||||
sb.append(", ").append(name);
|
||||
sb.append(", ").append(x);
|
||||
sb.append(", ").append(y);
|
||||
sb.append(", ").append(z);
|
||||
sb.append(", ").append(time);
|
||||
sb.append(", ").append(isdelete);
|
||||
|
||||
sb.append(")");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
160
src/main/java/ling/database/tables/pojos/VersionBO.java
Normal file
160
src/main/java/ling/database/tables/pojos/VersionBO.java
Normal file
@@ -0,0 +1,160 @@
|
||||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ling.database.tables.pojos;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class VersionBO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer id;
|
||||
private Integer version;
|
||||
private String versionname;
|
||||
private BigDecimal createtime;
|
||||
|
||||
public VersionBO() {}
|
||||
|
||||
public VersionBO(VersionBO value) {
|
||||
this.id = value.id;
|
||||
this.version = value.version;
|
||||
this.versionname = value.versionname;
|
||||
this.createtime = value.createtime;
|
||||
}
|
||||
|
||||
public VersionBO(
|
||||
Integer id,
|
||||
Integer version,
|
||||
String versionname,
|
||||
BigDecimal createtime
|
||||
) {
|
||||
this.id = id;
|
||||
this.version = version;
|
||||
this.versionname = versionname;
|
||||
this.createtime = createtime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>Version.ID</code>.
|
||||
*/
|
||||
public Integer getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>Version.ID</code>.
|
||||
*/
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>Version.version</code>.
|
||||
*/
|
||||
public Integer getVersion() {
|
||||
return this.version;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>Version.version</code>.
|
||||
*/
|
||||
public void setVersion(Integer version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>Version.versionName</code>.
|
||||
*/
|
||||
public String getVersionname() {
|
||||
return this.versionname;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>Version.versionName</code>.
|
||||
*/
|
||||
public void setVersionname(String versionname) {
|
||||
this.versionname = versionname;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>Version.createTime</code>.
|
||||
*/
|
||||
public BigDecimal getCreatetime() {
|
||||
return this.createtime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>Version.createTime</code>.
|
||||
*/
|
||||
public void setCreatetime(BigDecimal createtime) {
|
||||
this.createtime = createtime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
final VersionBO other = (VersionBO) obj;
|
||||
if (this.id == null) {
|
||||
if (other.id != null)
|
||||
return false;
|
||||
}
|
||||
else if (!this.id.equals(other.id))
|
||||
return false;
|
||||
if (this.version == null) {
|
||||
if (other.version != null)
|
||||
return false;
|
||||
}
|
||||
else if (!this.version.equals(other.version))
|
||||
return false;
|
||||
if (this.versionname == null) {
|
||||
if (other.versionname != null)
|
||||
return false;
|
||||
}
|
||||
else if (!this.versionname.equals(other.versionname))
|
||||
return false;
|
||||
if (this.createtime == null) {
|
||||
if (other.createtime != null)
|
||||
return false;
|
||||
}
|
||||
else if (!this.createtime.equals(other.createtime))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((this.id == null) ? 0 : this.id.hashCode());
|
||||
result = prime * result + ((this.version == null) ? 0 : this.version.hashCode());
|
||||
result = prime * result + ((this.versionname == null) ? 0 : this.versionname.hashCode());
|
||||
result = prime * result + ((this.createtime == null) ? 0 : this.createtime.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("VersionBO (");
|
||||
|
||||
sb.append(id);
|
||||
sb.append(", ").append(version);
|
||||
sb.append(", ").append(versionname);
|
||||
sb.append(", ").append(createtime);
|
||||
|
||||
sb.append(")");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,207 @@
|
||||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ling.database.tables.records;
|
||||
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import ling.database.tables.LocationnotepadTB;
|
||||
import ling.database.tables.pojos.LocationnotepadBO;
|
||||
|
||||
import org.jooq.Record1;
|
||||
import org.jooq.impl.UpdatableRecordImpl;
|
||||
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class LocationnotepadPO extends UpdatableRecordImpl<LocationnotepadPO> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Setter for <code>LocationNotepad.ID</code>.
|
||||
*/
|
||||
public void setId(Integer value) {
|
||||
set(0, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>LocationNotepad.ID</code>.
|
||||
*/
|
||||
public Integer getId() {
|
||||
return (Integer) get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>LocationNotepad.UID</code>.
|
||||
*/
|
||||
public void setUid(String value) {
|
||||
set(1, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>LocationNotepad.UID</code>.
|
||||
*/
|
||||
public String getUid() {
|
||||
return (String) get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>LocationNotepad.world</code>.
|
||||
*/
|
||||
public void setWorld(String value) {
|
||||
set(2, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>LocationNotepad.world</code>.
|
||||
*/
|
||||
public String getWorld() {
|
||||
return (String) get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>LocationNotepad.name</code>.
|
||||
*/
|
||||
public void setName(String value) {
|
||||
set(3, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>LocationNotepad.name</code>.
|
||||
*/
|
||||
public String getName() {
|
||||
return (String) get(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>LocationNotepad.x</code>.
|
||||
*/
|
||||
public void setX(Integer value) {
|
||||
set(4, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>LocationNotepad.x</code>.
|
||||
*/
|
||||
public Integer getX() {
|
||||
return (Integer) get(4);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>LocationNotepad.y</code>.
|
||||
*/
|
||||
public void setY(Integer value) {
|
||||
set(5, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>LocationNotepad.y</code>.
|
||||
*/
|
||||
public Integer getY() {
|
||||
return (Integer) get(5);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>LocationNotepad.z</code>.
|
||||
*/
|
||||
public void setZ(Integer value) {
|
||||
set(6, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>LocationNotepad.z</code>.
|
||||
*/
|
||||
public Integer getZ() {
|
||||
return (Integer) get(6);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>LocationNotepad.time</code>.
|
||||
*/
|
||||
public void setTime(BigDecimal value) {
|
||||
set(7, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>LocationNotepad.time</code>.
|
||||
*/
|
||||
public BigDecimal getTime() {
|
||||
return (BigDecimal) get(7);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>LocationNotepad.isDelete</code>.
|
||||
*/
|
||||
public void setIsdelete(Boolean value) {
|
||||
set(8, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>LocationNotepad.isDelete</code>.
|
||||
*/
|
||||
public Boolean getIsdelete() {
|
||||
return (Boolean) get(8);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Record1<Integer> key() {
|
||||
return (Record1) super.key();
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Create a detached LocationnotepadPO
|
||||
*/
|
||||
public LocationnotepadPO() {
|
||||
super(LocationnotepadTB.LOCATIONNOTEPAD);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialised LocationnotepadPO
|
||||
*/
|
||||
public LocationnotepadPO(Integer id, String uid, String world, String name, Integer x, Integer y, Integer z, BigDecimal time, Boolean isdelete) {
|
||||
super(LocationnotepadTB.LOCATIONNOTEPAD);
|
||||
|
||||
setId(id);
|
||||
setUid(uid);
|
||||
setWorld(world);
|
||||
setName(name);
|
||||
setX(x);
|
||||
setY(y);
|
||||
setZ(z);
|
||||
setTime(time);
|
||||
setIsdelete(isdelete);
|
||||
resetChangedOnNotNull();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialised LocationnotepadPO
|
||||
*/
|
||||
public LocationnotepadPO(LocationnotepadBO value) {
|
||||
super(LocationnotepadTB.LOCATIONNOTEPAD);
|
||||
|
||||
if (value != null) {
|
||||
setId(value.getId());
|
||||
setUid(value.getUid());
|
||||
setWorld(value.getWorld());
|
||||
setName(value.getName());
|
||||
setX(value.getX());
|
||||
setY(value.getY());
|
||||
setZ(value.getZ());
|
||||
setTime(value.getTime());
|
||||
setIsdelete(value.getIsdelete());
|
||||
resetChangedOnNotNull();
|
||||
}
|
||||
}
|
||||
}
|
||||
127
src/main/java/ling/database/tables/records/VersionPO.java
Normal file
127
src/main/java/ling/database/tables/records/VersionPO.java
Normal file
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ling.database.tables.records;
|
||||
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import ling.database.tables.VersionTB;
|
||||
import ling.database.tables.pojos.VersionBO;
|
||||
|
||||
import org.jooq.Record1;
|
||||
import org.jooq.impl.UpdatableRecordImpl;
|
||||
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||
public class VersionPO extends UpdatableRecordImpl<VersionPO> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Setter for <code>Version.ID</code>.
|
||||
*/
|
||||
public void setId(Integer value) {
|
||||
set(0, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>Version.ID</code>.
|
||||
*/
|
||||
public Integer getId() {
|
||||
return (Integer) get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>Version.version</code>.
|
||||
*/
|
||||
public void setVersion(Integer value) {
|
||||
set(1, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>Version.version</code>.
|
||||
*/
|
||||
public Integer getVersion() {
|
||||
return (Integer) get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>Version.versionName</code>.
|
||||
*/
|
||||
public void setVersionname(String value) {
|
||||
set(2, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>Version.versionName</code>.
|
||||
*/
|
||||
public String getVersionname() {
|
||||
return (String) get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>Version.createTime</code>.
|
||||
*/
|
||||
public void setCreatetime(BigDecimal value) {
|
||||
set(3, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>Version.createTime</code>.
|
||||
*/
|
||||
public BigDecimal getCreatetime() {
|
||||
return (BigDecimal) get(3);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Record1<Integer> key() {
|
||||
return (Record1) super.key();
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Create a detached VersionPO
|
||||
*/
|
||||
public VersionPO() {
|
||||
super(VersionTB.VERSION);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialised VersionPO
|
||||
*/
|
||||
public VersionPO(Integer id, Integer version, String versionname, BigDecimal createtime) {
|
||||
super(VersionTB.VERSION);
|
||||
|
||||
setId(id);
|
||||
setVersion(version);
|
||||
setVersionname(versionname);
|
||||
setCreatetime(createtime);
|
||||
resetChangedOnNotNull();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialised VersionPO
|
||||
*/
|
||||
public VersionPO(VersionBO value) {
|
||||
super(VersionTB.VERSION);
|
||||
|
||||
if (value != null) {
|
||||
setId(value.getId());
|
||||
setVersion(value.getVersion());
|
||||
setVersionname(value.getVersionname());
|
||||
setCreatetime(value.getCreatetime());
|
||||
resetChangedOnNotNull();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user