-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
vzakharchenko
committed
Mar 10, 2020
1 parent
8779d48
commit 387d2d3
Showing
47 changed files
with
1,224 additions
and
397 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
...main/java/com/github/vzakharchenko/dynamic/orm/core/dynamic/NumberColumnMetaDataInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
package com.github.vzakharchenko.dynamic.orm.core.dynamic; | ||
|
||
|
||
import com.github.vzakharchenko.dynamic.orm.core.dynamic.column.QNumberColumn; | ||
import com.querydsl.core.types.Path; | ||
|
||
/** | ||
* | ||
*/ | ||
public class NumberColumnMetaDataInfo implements ColumnMetaDataInfo { | ||
|
||
|
||
private final Path column; | ||
|
||
private final Integer size; | ||
|
||
private final String jdbcType; | ||
|
||
private final Boolean nullable; | ||
|
||
private final Integer decimalDigits; | ||
|
||
private final Boolean primaryKey; | ||
|
||
protected NumberColumnMetaDataInfo(Path column, String type, | ||
QNumberColumn numberColumn) { | ||
this.column = column; | ||
this.jdbcType = type; | ||
this.size = numberColumn.size(); | ||
this.nullable = !numberColumn.notNull(); | ||
this.decimalDigits = numberColumn.decimalDigits(); | ||
this.primaryKey = numberColumn.isPrimaryKey(); | ||
} | ||
|
||
@Override | ||
public Path getColumn() { | ||
return column; | ||
} | ||
|
||
@Override | ||
public Integer getSize() { | ||
return size; | ||
} | ||
|
||
@Override | ||
public String getJdbcType() { | ||
return jdbcType; | ||
} | ||
|
||
@Override | ||
public Integer getDecimalDigits() { | ||
return decimalDigits; | ||
} | ||
|
||
@Override | ||
public Boolean isNullable() { | ||
return nullable; | ||
} | ||
|
||
@Override | ||
public Boolean isPrimaryKey() { | ||
return primaryKey; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...rm-core/src/main/java/com/github/vzakharchenko/dynamic/orm/core/dynamic/QBlobBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.github.vzakharchenko.dynamic.orm.core.dynamic; | ||
|
||
import com.github.vzakharchenko.dynamic.orm.core.dynamic.column.QSizeColumnImpl; | ||
import com.github.vzakharchenko.dynamic.orm.core.dynamic.column.QTableColumn; | ||
import com.github.vzakharchenko.dynamic.orm.core.dynamic.column.QTableColumnContext; | ||
import com.github.vzakharchenko.dynamic.orm.core.dynamic.column.builder.QSizeColumnBuilder; | ||
import com.github.vzakharchenko.dynamic.orm.core.dynamic.column.builder.QSizeColumnBuilderImpl; | ||
import liquibase.database.Database; | ||
|
||
public class QBlobBuilder extends QSizeColumnBuilderImpl<QSizeColumnImpl, | ||
QSizeColumnBuilder<QTableColumn, ?>> { | ||
|
||
|
||
public QBlobBuilder(QTableColumnContext qTableColumn, String columnName) { | ||
super(qTableColumn, columnName); | ||
} | ||
|
||
@Override | ||
protected QSizeColumnImpl construct(String columnName) { | ||
return new QSizeColumnImpl(columnName); | ||
} | ||
|
||
@Override | ||
protected void createColumn(QDynamicTable dynamicTable, Database database) { | ||
dynamicTable | ||
.createBlobColumn(database, columnType); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...core/src/main/java/com/github/vzakharchenko/dynamic/orm/core/dynamic/QBooleanBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.github.vzakharchenko.dynamic.orm.core.dynamic; | ||
|
||
import com.github.vzakharchenko.dynamic.orm.core.dynamic.column.QDefaultColumn; | ||
import com.github.vzakharchenko.dynamic.orm.core.dynamic.column.QTableColumn; | ||
import com.github.vzakharchenko.dynamic.orm.core.dynamic.column.QTableColumnContext; | ||
import com.github.vzakharchenko.dynamic.orm.core.dynamic.column.builder.QDefaultColumnBuilder; | ||
import com.github.vzakharchenko.dynamic.orm.core.dynamic.column.builder.QSizeColumnBuilder; | ||
import liquibase.database.Database; | ||
|
||
public class QBooleanBuilder extends QDefaultColumnBuilder<QDefaultColumn, | ||
QSizeColumnBuilder<QTableColumn, ?>> { | ||
|
||
|
||
public QBooleanBuilder(QTableColumnContext qTableColumn, String columnName) { | ||
super(qTableColumn, columnName); | ||
} | ||
|
||
@Override | ||
protected QDefaultColumn construct(String columnName) { | ||
return new QDefaultColumn(columnName); | ||
} | ||
|
||
@Override | ||
protected void createColumn(QDynamicTable dynamicTable, | ||
Database database) { | ||
dynamicTable | ||
.createBooleanColumn(database, columnType); | ||
} | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
...rm-core/src/main/java/com/github/vzakharchenko/dynamic/orm/core/dynamic/QCharBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.github.vzakharchenko.dynamic.orm.core.dynamic; | ||
|
||
import com.github.vzakharchenko.dynamic.orm.core.dynamic.column.QSizeColumnImpl; | ||
import com.github.vzakharchenko.dynamic.orm.core.dynamic.column.QTableColumn; | ||
import com.github.vzakharchenko.dynamic.orm.core.dynamic.column.QTableColumnContext; | ||
import com.github.vzakharchenko.dynamic.orm.core.dynamic.column.builder.QSizeColumnBuilder; | ||
import com.github.vzakharchenko.dynamic.orm.core.dynamic.column.builder.QSizeColumnBuilderImpl; | ||
import liquibase.database.Database; | ||
|
||
public class QCharBuilder extends QSizeColumnBuilderImpl<QSizeColumnImpl, | ||
QSizeColumnBuilder<QTableColumn, ?>> { | ||
|
||
|
||
public QCharBuilder(QTableColumnContext qTableColumn, String columnName) { | ||
super(qTableColumn, columnName); | ||
} | ||
|
||
@Override | ||
protected QSizeColumnImpl construct(String columnName) { | ||
return new QSizeColumnImpl(columnName); | ||
} | ||
|
||
@Override | ||
protected void createColumn(QDynamicTable dynamicTable, | ||
Database database) { | ||
dynamicTable | ||
.createCharColumn(database, columnType); | ||
} | ||
|
||
} |
Oops, something went wrong.