-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://hibernate.atlassian.net/browse/HHH-17377 XJB changes (JAXB "binding model")
- Loading branch information
Showing
20 changed files
with
329 additions
and
32 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
15 changes: 0 additions & 15 deletions
15
hibernate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/JaxbTableMapping.java
This file was deleted.
Oops, something went wrong.
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
19 changes: 19 additions & 0 deletions
19
hibernate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/db/JaxbCheckable.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,19 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html. | ||
*/ | ||
package org.hibernate.boot.jaxb.mapping.spi.db; | ||
|
||
import java.util.List; | ||
|
||
import org.hibernate.boot.jaxb.mapping.spi.JaxbCheckConstraintImpl; | ||
|
||
/** | ||
* @author Steve Ebersole | ||
*/ | ||
public interface JaxbCheckable { | ||
|
||
List<JaxbCheckConstraintImpl> getCheckConstraints(); | ||
} |
20 changes: 20 additions & 0 deletions
20
hibernate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/db/JaxbColumn.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,20 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html. | ||
*/ | ||
package org.hibernate.boot.jaxb.mapping.spi.db; | ||
|
||
/** | ||
* Base definition for XSD column mappings | ||
* | ||
* @author Steve Ebersole | ||
*/ | ||
public interface JaxbColumn extends JaxbDatabaseObject { | ||
String getName(); | ||
|
||
default String getTable() { | ||
return null; | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
hibernate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/db/JaxbColumnCommon.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,55 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html. | ||
*/ | ||
package org.hibernate.boot.jaxb.mapping.spi.db; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
import org.hibernate.boot.jaxb.mapping.spi.JaxbCheckConstraintImpl; | ||
|
||
/** | ||
* Composition of the aspects of column definition most commonly exposed in XSD "column types" | ||
* | ||
* @author Steve Ebersole | ||
*/ | ||
public interface JaxbColumnCommon | ||
extends JaxbColumn, JaxbColumnMutable, JaxbCheckable, JaxbColumnNullable, JaxbColumnUniqueable, JaxbColumnDefinable, JaxbCommentable { | ||
@Override | ||
default String getTable() { | ||
return null; | ||
} | ||
|
||
@Override | ||
default Boolean isNullable() { | ||
return null; | ||
} | ||
|
||
@Override | ||
default Boolean isInsertable() { | ||
return null; | ||
} | ||
|
||
@Override | ||
default Boolean isUpdatable() { | ||
return null; | ||
} | ||
|
||
@Override | ||
default String getComment() { | ||
return null; | ||
} | ||
|
||
@Override | ||
default Boolean isUnique() { | ||
return null; | ||
} | ||
|
||
@Override | ||
default List<JaxbCheckConstraintImpl> getCheckConstraints() { | ||
return Collections.emptyList(); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...nate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/db/JaxbColumnDefaultable.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,14 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html. | ||
*/ | ||
package org.hibernate.boot.jaxb.mapping.spi.db; | ||
|
||
/** | ||
* @author Steve Ebersole | ||
*/ | ||
public interface JaxbColumnDefaultable extends JaxbColumn { | ||
String getDefault(); | ||
} |
15 changes: 15 additions & 0 deletions
15
hibernate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/db/JaxbColumnDefinable.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,15 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html. | ||
*/ | ||
package org.hibernate.boot.jaxb.mapping.spi.db; | ||
|
||
/** | ||
* @author Steve Ebersole | ||
*/ | ||
public interface JaxbColumnDefinable extends JaxbColumn { | ||
String getColumnDefinition(); | ||
String getOptions(); | ||
} |
19 changes: 19 additions & 0 deletions
19
hibernate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/db/JaxbColumnJoined.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,19 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html. | ||
*/ | ||
package org.hibernate.boot.jaxb.mapping.spi.db; | ||
|
||
import org.hibernate.boot.jaxb.mapping.spi.JaxbForeignKeyImpl; | ||
|
||
/** | ||
* Composition of the aspects of column definition for join "column types" exposed in XSD | ||
* | ||
* @author Steve Ebersole | ||
*/ | ||
public interface JaxbColumnJoined extends JaxbColumnCommon { | ||
String getReferencedColumnName(); | ||
JaxbForeignKeyImpl getForeignKey(); | ||
} |
15 changes: 15 additions & 0 deletions
15
hibernate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/db/JaxbColumnMutable.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,15 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html. | ||
*/ | ||
package org.hibernate.boot.jaxb.mapping.spi.db; | ||
|
||
/** | ||
* @author Steve Ebersole | ||
*/ | ||
public interface JaxbColumnMutable extends JaxbColumn { | ||
Boolean isInsertable(); | ||
Boolean isUpdatable(); | ||
} |
15 changes: 15 additions & 0 deletions
15
hibernate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/db/JaxbColumnNullable.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,15 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html. | ||
*/ | ||
package org.hibernate.boot.jaxb.mapping.spi.db; | ||
|
||
/** | ||
* @author Steve Ebersole | ||
*/ | ||
public interface JaxbColumnNullable extends JaxbColumn { | ||
|
||
Boolean isNullable(); | ||
} |
22 changes: 22 additions & 0 deletions
22
hibernate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/db/JaxbColumnSizable.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,22 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html. | ||
*/ | ||
package org.hibernate.boot.jaxb.mapping.spi.db; | ||
|
||
/** | ||
* @author Steve Ebersole | ||
*/ | ||
public interface JaxbColumnSizable extends JaxbColumn { | ||
Integer getLength(); | ||
|
||
default Integer getPrecision() { | ||
return null; | ||
} | ||
|
||
default Integer getScale() { | ||
return null; | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
hibernate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/db/JaxbColumnStandard.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,20 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html. | ||
*/ | ||
package org.hibernate.boot.jaxb.mapping.spi.db; | ||
|
||
/** | ||
* Composition of the aspects of column definition for standard "column types" exposed in XSD | ||
* | ||
* @author Steve Ebersole | ||
*/ | ||
public interface JaxbColumnStandard | ||
extends JaxbColumn, JaxbColumnMutable, JaxbCheckable, JaxbColumnNullable, JaxbColumnUniqueable, | ||
JaxbColumnDefinable, JaxbColumnSizable, JaxbColumnDefaultable, JaxbCommentable { | ||
|
||
String getRead(); | ||
String getWrite(); | ||
} |
14 changes: 14 additions & 0 deletions
14
...rnate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/db/JaxbColumnUniqueable.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,14 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html. | ||
*/ | ||
package org.hibernate.boot.jaxb.mapping.spi.db; | ||
|
||
/** | ||
* @author Steve Ebersole | ||
*/ | ||
public interface JaxbColumnUniqueable extends JaxbColumn { | ||
Boolean isUnique(); | ||
} |
14 changes: 14 additions & 0 deletions
14
hibernate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/db/JaxbCommentable.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,14 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html. | ||
*/ | ||
package org.hibernate.boot.jaxb.mapping.spi.db; | ||
|
||
/** | ||
* @author Steve Ebersole | ||
*/ | ||
public interface JaxbCommentable { | ||
String getComment(); | ||
} |
15 changes: 15 additions & 0 deletions
15
hibernate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/db/JaxbDatabaseObject.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,15 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html. | ||
*/ | ||
package org.hibernate.boot.jaxb.mapping.spi.db; | ||
|
||
/** | ||
* Marker interface for database objects | ||
* | ||
* @author Steve Ebersole | ||
*/ | ||
public interface JaxbDatabaseObject { | ||
} |
19 changes: 19 additions & 0 deletions
19
hibernate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/db/JaxbTableMapping.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,19 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html. | ||
*/ | ||
package org.hibernate.boot.jaxb.mapping.spi.db; | ||
|
||
import org.hibernate.boot.jaxb.mapping.spi.JaxbSchemaAware; | ||
import org.hibernate.boot.jaxb.mapping.spi.db.JaxbCheckable; | ||
import org.hibernate.boot.jaxb.mapping.spi.db.JaxbDatabaseObject; | ||
|
||
/** | ||
* @author Steve Ebersole | ||
*/ | ||
public interface JaxbTableMapping extends JaxbSchemaAware, JaxbCheckable, JaxbDatabaseObject { | ||
String getComment(); | ||
String getOptions(); | ||
} |
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
Oops, something went wrong.