[jOOQ/jOOQ#10588] Rename <syntheticKeys/> to <syntheticObjects/>
This commit is contained in:
parent
7d53551114
commit
3616cc43c7
@ -561,7 +561,7 @@ public class GenerationTool {
|
||||
database.setConfiguredEnumTypes(d.getEnumTypes());
|
||||
database.setConfiguredForcedTypes(d.getForcedTypes());
|
||||
database.setConfiguredEmbeddables(d.getEmbeddables());
|
||||
database.setConfiguredSyntheticKeys(d.getSyntheticKeys());
|
||||
database.setConfiguredSyntheticObjects(d.getSyntheticObjects());
|
||||
database.setEmbeddablePrimaryKeys(TRUE.equals(d.isEmbeddablePrimaryKeys()));
|
||||
database.setEmbeddableUniqueKeys(TRUE.equals(d.isEmbeddableUniqueKeys()));
|
||||
database.setEmbeddableDomains(TRUE.equals(d.isEmbeddableDomains()));
|
||||
|
||||
@ -105,7 +105,7 @@ import org.jooq.meta.jaxb.RegexFlag;
|
||||
import org.jooq.meta.jaxb.SchemaMappingType;
|
||||
import org.jooq.meta.jaxb.SyntheticForeignKeyType;
|
||||
import org.jooq.meta.jaxb.SyntheticIdentityType;
|
||||
import org.jooq.meta.jaxb.SyntheticKeysType;
|
||||
import org.jooq.meta.jaxb.SyntheticObjectsType;
|
||||
import org.jooq.meta.jaxb.SyntheticPrimaryKeyType;
|
||||
import org.jooq.meta.jaxb.SyntheticUniqueKeyType;
|
||||
// ...
|
||||
@ -1197,7 +1197,7 @@ public abstract class AbstractDatabase implements Database {
|
||||
if (syntheticPrimaryKeys != null) {
|
||||
for (String syntheticPrimaryKey : syntheticPrimaryKeys) {
|
||||
if (!StringUtils.isBlank(syntheticPrimaryKey)) {
|
||||
log.warn("DEPRECATION", "The <syntheticPrimaryKeys/> configuration element has been deprecated in jOOQ 3.14. Use <syntheticKeys/> only, instead.");
|
||||
log.warn("DEPRECATION", "The <syntheticPrimaryKeys/> configuration element has been deprecated in jOOQ 3.14. Use <syntheticObjects/> only, instead.");
|
||||
getConfiguredSyntheticPrimaryKeys().add(new SyntheticPrimaryKeyType().withKeyFields(syntheticPrimaryKey));
|
||||
}
|
||||
}
|
||||
@ -1207,7 +1207,7 @@ public abstract class AbstractDatabase implements Database {
|
||||
@Override
|
||||
@Deprecated
|
||||
public String[] getSyntheticPrimaryKeys() {
|
||||
log.warn("DEPRECATION", "The <syntheticPrimaryKeys/> configuration element has been deprecated in jOOQ 3.14. Use <syntheticKeys/> only, instead.");
|
||||
log.warn("DEPRECATION", "The <syntheticPrimaryKeys/> configuration element has been deprecated in jOOQ 3.14. Use <syntheticObjects/> only, instead.");
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
@ -1217,7 +1217,7 @@ public abstract class AbstractDatabase implements Database {
|
||||
if (overridePrimaryKeys != null) {
|
||||
for (String overridePrimaryKey : overridePrimaryKeys) {
|
||||
if (!StringUtils.isBlank(overridePrimaryKey)) {
|
||||
log.warn("DEPRECATION", "The <overridePrimaryKeys/> configuration element has been deprecated in jOOQ 3.14. Use <syntheticKeys/> only, instead.");
|
||||
log.warn("DEPRECATION", "The <overridePrimaryKeys/> configuration element has been deprecated in jOOQ 3.14. Use <syntheticObjects/> only, instead.");
|
||||
getConfiguredSyntheticPrimaryKeys().add(new SyntheticPrimaryKeyType().withKey(overridePrimaryKey));
|
||||
}
|
||||
}
|
||||
@ -1227,7 +1227,7 @@ public abstract class AbstractDatabase implements Database {
|
||||
@Override
|
||||
@Deprecated
|
||||
public String[] getOverridePrimaryKeys() {
|
||||
log.warn("DEPRECATION", "The <overridePrimaryKeys/> configuration element has been deprecated in jOOQ 3.14. Use <syntheticKeys/> only, instead.");
|
||||
log.warn("DEPRECATION", "The <overridePrimaryKeys/> configuration element has been deprecated in jOOQ 3.14. Use <syntheticObjects/> only, instead.");
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
@ -1237,7 +1237,7 @@ public abstract class AbstractDatabase implements Database {
|
||||
if (syntheticIdentities != null) {
|
||||
for (String syntheticIdentity : syntheticIdentities) {
|
||||
if (!StringUtils.isBlank(syntheticIdentity)) {
|
||||
log.warn("DEPRECATION", "The <syntheticIdentities/> configuration element has been deprecated in jOOQ 3.14. Use <syntheticKeys/> only, instead.");
|
||||
log.warn("DEPRECATION", "The <syntheticIdentities/> configuration element has been deprecated in jOOQ 3.14. Use <syntheticObjects/> only, instead.");
|
||||
getConfiguredSyntheticIdentities().add(new SyntheticIdentityType().withKeyFields(syntheticIdentity));
|
||||
}
|
||||
}
|
||||
@ -1247,7 +1247,7 @@ public abstract class AbstractDatabase implements Database {
|
||||
@Override
|
||||
@Deprecated
|
||||
public final String[] getSyntheticIdentities() {
|
||||
log.warn("DEPRECATION", "The <syntheticIdentities/> configuration element has been deprecated in jOOQ 3.14. Use <syntheticKeys/> only, instead.");
|
||||
log.warn("DEPRECATION", "The <syntheticIdentities/> configuration element has been deprecated in jOOQ 3.14. Use <syntheticObjects/> only, instead.");
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
@ -2767,30 +2767,30 @@ public abstract class AbstractDatabase implements Database {
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Override
|
||||
public void setConfiguredSyntheticKeys(SyntheticKeysType configuredSyntheticKeys) {
|
||||
if (configuredSyntheticKeys != null) {
|
||||
public void setConfiguredSyntheticObjects(SyntheticObjectsType configuredSyntheticObjects) {
|
||||
if (configuredSyntheticObjects != null) {
|
||||
// [#8512] Some implementation of this database may have already
|
||||
// configured things programmatically, so we must not set the
|
||||
// list but append it.
|
||||
|
||||
getConfiguredSyntheticIdentities().addAll(configuredSyntheticKeys.getIdentities());
|
||||
getConfiguredSyntheticPrimaryKeys().addAll(configuredSyntheticKeys.getPrimaryKeys());
|
||||
getConfiguredSyntheticUniqueKeys().addAll(configuredSyntheticKeys.getUniqueKeys());
|
||||
getConfiguredSyntheticForeignKeys().addAll(configuredSyntheticKeys.getForeignKeys());
|
||||
getConfiguredSyntheticIdentities().addAll(configuredSyntheticObjects.getIdentities());
|
||||
getConfiguredSyntheticPrimaryKeys().addAll(configuredSyntheticObjects.getPrimaryKeys());
|
||||
getConfiguredSyntheticUniqueKeys().addAll(configuredSyntheticObjects.getUniqueKeys());
|
||||
getConfiguredSyntheticForeignKeys().addAll(configuredSyntheticObjects.getForeignKeys());
|
||||
|
||||
unusedSyntheticIdentities.addAll(configuredSyntheticKeys.getIdentities());
|
||||
unusedSyntheticPrimaryKeys.addAll(configuredSyntheticKeys.getPrimaryKeys());
|
||||
unusedSyntheticUniqueKeys.addAll(configuredSyntheticKeys.getUniqueKeys());
|
||||
unusedSyntheticForeignKeys.addAll(configuredSyntheticKeys.getForeignKeys());
|
||||
unusedSyntheticIdentities.addAll(configuredSyntheticObjects.getIdentities());
|
||||
unusedSyntheticPrimaryKeys.addAll(configuredSyntheticObjects.getPrimaryKeys());
|
||||
unusedSyntheticUniqueKeys.addAll(configuredSyntheticObjects.getUniqueKeys());
|
||||
unusedSyntheticForeignKeys.addAll(configuredSyntheticObjects.getForeignKeys());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (!configuredSyntheticKeys.getUniqueKeys().isEmpty())
|
||||
if (!configuredSyntheticObjects.getUniqueKeys().isEmpty())
|
||||
log.info("Commercial feature", "Synthetic unique keys are a commercial only feature. Please upgrade to the jOOQ Professional Edition");
|
||||
if (!configuredSyntheticKeys.getForeignKeys().isEmpty())
|
||||
if (!configuredSyntheticObjects.getForeignKeys().isEmpty())
|
||||
log.info("Commercial feature", "Synthetic foreign keys are a commercial only feature. Please upgrade to the jOOQ Professional Edition");
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ import org.jooq.meta.jaxb.RegexFlag;
|
||||
import org.jooq.meta.jaxb.SchemaMappingType;
|
||||
import org.jooq.meta.jaxb.SyntheticForeignKeyType;
|
||||
import org.jooq.meta.jaxb.SyntheticIdentityType;
|
||||
import org.jooq.meta.jaxb.SyntheticKeysType;
|
||||
import org.jooq.meta.jaxb.SyntheticObjectsType;
|
||||
import org.jooq.meta.jaxb.SyntheticPrimaryKeyType;
|
||||
import org.jooq.meta.jaxb.SyntheticUniqueKeyType;
|
||||
|
||||
@ -986,9 +986,9 @@ public interface Database extends AutoCloseable {
|
||||
void setEmbeddableDomains(boolean embeddableDomains);
|
||||
|
||||
/**
|
||||
* Configure the synthetic keys.
|
||||
* Configure the synthetic objects.
|
||||
*/
|
||||
void setConfiguredSyntheticKeys(SyntheticKeysType configuredSyntheticKeys);
|
||||
void setConfiguredSyntheticObjects(SyntheticObjectsType configuredSyntheticObjects);
|
||||
|
||||
/**
|
||||
* Get the configured synthetic identities.
|
||||
|
||||
@ -95,7 +95,7 @@ public class Database implements Serializable, XMLAppendable
|
||||
@XmlElement(defaultValue = "")
|
||||
@XmlJavaTypeAdapter(StringAdapter.class)
|
||||
protected String recordTimestampFields = "";
|
||||
protected SyntheticKeysType syntheticKeys;
|
||||
protected SyntheticObjectsType syntheticObjects;
|
||||
@XmlElement(defaultValue = "")
|
||||
@XmlJavaTypeAdapter(StringAdapter.class)
|
||||
protected String syntheticIdentities = "";
|
||||
@ -931,19 +931,19 @@ public class Database implements Serializable, XMLAppendable
|
||||
}
|
||||
|
||||
/**
|
||||
* The synthetic key configuration.
|
||||
* The synthetic objects configuration.
|
||||
*
|
||||
*/
|
||||
public SyntheticKeysType getSyntheticKeys() {
|
||||
return syntheticKeys;
|
||||
public SyntheticObjectsType getSyntheticObjects() {
|
||||
return syntheticObjects;
|
||||
}
|
||||
|
||||
/**
|
||||
* The synthetic key configuration.
|
||||
* The synthetic objects configuration.
|
||||
*
|
||||
*/
|
||||
public void setSyntheticKeys(SyntheticKeysType value) {
|
||||
this.syntheticKeys = value;
|
||||
public void setSyntheticObjects(SyntheticObjectsType value) {
|
||||
this.syntheticObjects = value;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1925,11 +1925,11 @@ public class Database implements Serializable, XMLAppendable
|
||||
}
|
||||
|
||||
/**
|
||||
* The synthetic key configuration.
|
||||
* The synthetic objects configuration.
|
||||
*
|
||||
*/
|
||||
public Database withSyntheticKeys(SyntheticKeysType value) {
|
||||
setSyntheticKeys(value);
|
||||
public Database withSyntheticObjects(SyntheticObjectsType value) {
|
||||
setSyntheticObjects(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -2350,7 +2350,7 @@ public class Database implements Serializable, XMLAppendable
|
||||
builder.append("includeInvisibleColumns", includeInvisibleColumns);
|
||||
builder.append("recordVersionFields", recordVersionFields);
|
||||
builder.append("recordTimestampFields", recordTimestampFields);
|
||||
builder.append("syntheticKeys", syntheticKeys);
|
||||
builder.append("syntheticObjects", syntheticObjects);
|
||||
builder.append("syntheticIdentities", syntheticIdentities);
|
||||
builder.append("syntheticPrimaryKeys", syntheticPrimaryKeys);
|
||||
builder.append("overridePrimaryKeys", overridePrimaryKeys);
|
||||
@ -2654,12 +2654,12 @@ public class Database implements Serializable, XMLAppendable
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (syntheticKeys == null) {
|
||||
if (other.syntheticKeys!= null) {
|
||||
if (syntheticObjects == null) {
|
||||
if (other.syntheticObjects!= null) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!syntheticKeys.equals(other.syntheticKeys)) {
|
||||
if (!syntheticObjects.equals(other.syntheticObjects)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -2968,7 +2968,7 @@ public class Database implements Serializable, XMLAppendable
|
||||
result = ((prime*result)+((includeInvisibleColumns == null)? 0 :includeInvisibleColumns.hashCode()));
|
||||
result = ((prime*result)+((recordVersionFields == null)? 0 :recordVersionFields.hashCode()));
|
||||
result = ((prime*result)+((recordTimestampFields == null)? 0 :recordTimestampFields.hashCode()));
|
||||
result = ((prime*result)+((syntheticKeys == null)? 0 :syntheticKeys.hashCode()));
|
||||
result = ((prime*result)+((syntheticObjects == null)? 0 :syntheticObjects.hashCode()));
|
||||
result = ((prime*result)+((syntheticIdentities == null)? 0 :syntheticIdentities.hashCode()));
|
||||
result = ((prime*result)+((syntheticPrimaryKeys == null)? 0 :syntheticPrimaryKeys.hashCode()));
|
||||
result = ((prime*result)+((overridePrimaryKeys == null)? 0 :overridePrimaryKeys.hashCode()));
|
||||
|
||||
@ -158,11 +158,11 @@ public class ObjectFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link SyntheticKeysType }
|
||||
* Create an instance of {@link SyntheticObjectsType }
|
||||
*
|
||||
*/
|
||||
public SyntheticKeysType createSyntheticKeysType() {
|
||||
return new SyntheticKeysType();
|
||||
public SyntheticObjectsType createSyntheticObjectsType() {
|
||||
return new SyntheticObjectsType();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -15,19 +15,19 @@ import org.jooq.util.jaxb.tools.XMLBuilder;
|
||||
|
||||
|
||||
/**
|
||||
* Synthetic key configuration.
|
||||
* Synthetic objects configuration.
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "SyntheticKeysType", propOrder = {
|
||||
@XmlType(name = "SyntheticObjectsType", propOrder = {
|
||||
|
||||
})
|
||||
@SuppressWarnings({
|
||||
"all"
|
||||
})
|
||||
public class SyntheticKeysType implements Serializable, XMLAppendable
|
||||
public class SyntheticObjectsType implements Serializable, XMLAppendable
|
||||
{
|
||||
|
||||
private final static long serialVersionUID = 31400L;
|
||||
@ -88,7 +88,7 @@ public class SyntheticKeysType implements Serializable, XMLAppendable
|
||||
this.foreignKeys = foreignKeys;
|
||||
}
|
||||
|
||||
public SyntheticKeysType withIdentities(SyntheticIdentityType... values) {
|
||||
public SyntheticObjectsType withIdentities(SyntheticIdentityType... values) {
|
||||
if (values!= null) {
|
||||
for (SyntheticIdentityType value: values) {
|
||||
getIdentities().add(value);
|
||||
@ -97,19 +97,19 @@ public class SyntheticKeysType implements Serializable, XMLAppendable
|
||||
return this;
|
||||
}
|
||||
|
||||
public SyntheticKeysType withIdentities(Collection<SyntheticIdentityType> values) {
|
||||
public SyntheticObjectsType withIdentities(Collection<SyntheticIdentityType> values) {
|
||||
if (values!= null) {
|
||||
getIdentities().addAll(values);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public SyntheticKeysType withIdentities(List<SyntheticIdentityType> identities) {
|
||||
public SyntheticObjectsType withIdentities(List<SyntheticIdentityType> identities) {
|
||||
setIdentities(identities);
|
||||
return this;
|
||||
}
|
||||
|
||||
public SyntheticKeysType withPrimaryKeys(SyntheticPrimaryKeyType... values) {
|
||||
public SyntheticObjectsType withPrimaryKeys(SyntheticPrimaryKeyType... values) {
|
||||
if (values!= null) {
|
||||
for (SyntheticPrimaryKeyType value: values) {
|
||||
getPrimaryKeys().add(value);
|
||||
@ -118,19 +118,19 @@ public class SyntheticKeysType implements Serializable, XMLAppendable
|
||||
return this;
|
||||
}
|
||||
|
||||
public SyntheticKeysType withPrimaryKeys(Collection<SyntheticPrimaryKeyType> values) {
|
||||
public SyntheticObjectsType withPrimaryKeys(Collection<SyntheticPrimaryKeyType> values) {
|
||||
if (values!= null) {
|
||||
getPrimaryKeys().addAll(values);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public SyntheticKeysType withPrimaryKeys(List<SyntheticPrimaryKeyType> primaryKeys) {
|
||||
public SyntheticObjectsType withPrimaryKeys(List<SyntheticPrimaryKeyType> primaryKeys) {
|
||||
setPrimaryKeys(primaryKeys);
|
||||
return this;
|
||||
}
|
||||
|
||||
public SyntheticKeysType withUniqueKeys(SyntheticUniqueKeyType... values) {
|
||||
public SyntheticObjectsType withUniqueKeys(SyntheticUniqueKeyType... values) {
|
||||
if (values!= null) {
|
||||
for (SyntheticUniqueKeyType value: values) {
|
||||
getUniqueKeys().add(value);
|
||||
@ -139,19 +139,19 @@ public class SyntheticKeysType implements Serializable, XMLAppendable
|
||||
return this;
|
||||
}
|
||||
|
||||
public SyntheticKeysType withUniqueKeys(Collection<SyntheticUniqueKeyType> values) {
|
||||
public SyntheticObjectsType withUniqueKeys(Collection<SyntheticUniqueKeyType> values) {
|
||||
if (values!= null) {
|
||||
getUniqueKeys().addAll(values);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public SyntheticKeysType withUniqueKeys(List<SyntheticUniqueKeyType> uniqueKeys) {
|
||||
public SyntheticObjectsType withUniqueKeys(List<SyntheticUniqueKeyType> uniqueKeys) {
|
||||
setUniqueKeys(uniqueKeys);
|
||||
return this;
|
||||
}
|
||||
|
||||
public SyntheticKeysType withForeignKeys(SyntheticForeignKeyType... values) {
|
||||
public SyntheticObjectsType withForeignKeys(SyntheticForeignKeyType... values) {
|
||||
if (values!= null) {
|
||||
for (SyntheticForeignKeyType value: values) {
|
||||
getForeignKeys().add(value);
|
||||
@ -160,14 +160,14 @@ public class SyntheticKeysType implements Serializable, XMLAppendable
|
||||
return this;
|
||||
}
|
||||
|
||||
public SyntheticKeysType withForeignKeys(Collection<SyntheticForeignKeyType> values) {
|
||||
public SyntheticObjectsType withForeignKeys(Collection<SyntheticForeignKeyType> values) {
|
||||
if (values!= null) {
|
||||
getForeignKeys().addAll(values);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public SyntheticKeysType withForeignKeys(List<SyntheticForeignKeyType> foreignKeys) {
|
||||
public SyntheticObjectsType withForeignKeys(List<SyntheticForeignKeyType> foreignKeys) {
|
||||
setForeignKeys(foreignKeys);
|
||||
return this;
|
||||
}
|
||||
@ -198,7 +198,7 @@ public class SyntheticKeysType implements Serializable, XMLAppendable
|
||||
if (getClass()!= that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
SyntheticKeysType other = ((SyntheticKeysType) that);
|
||||
SyntheticObjectsType other = ((SyntheticObjectsType) that);
|
||||
if (identities == null) {
|
||||
if (other.identities!= null) {
|
||||
return false;
|
||||
@ -671,8 +671,8 @@ This is a Java regular expression. Use the pipe to separate several expressions.
|
||||
See {@link org.jooq.UpdatableRecord#store()} and {@link org.jooq.UpdatableRecord#delete()} for details about optimistic locking.]]></jxb:javadoc></jxb:property></appinfo></annotation>
|
||||
</element>
|
||||
|
||||
<element name="syntheticKeys" type="tns:SyntheticKeysType" minOccurs="0" maxOccurs="1">
|
||||
<annotation><appinfo><jxb:property><jxb:javadoc><![CDATA[The synthetic key configuration.]]></jxb:javadoc></jxb:property></appinfo></annotation>
|
||||
<element name="syntheticObjects" type="tns:SyntheticObjectsType" minOccurs="0" maxOccurs="1">
|
||||
<annotation><appinfo><jxb:property><jxb:javadoc><![CDATA[The synthetic objects configuration.]]></jxb:javadoc></jxb:property></appinfo></annotation>
|
||||
</element>
|
||||
|
||||
<element name="syntheticIdentities" type="string" default="" minOccurs="0" maxOccurs="1">
|
||||
@ -915,8 +915,8 @@ for Oracle.]]></jxb:javadoc></jxb:property></appinfo></annotation>
|
||||
</all>
|
||||
</complexType>
|
||||
|
||||
<complexType name="SyntheticKeysType">
|
||||
<annotation><appinfo><jxb:class><jxb:javadoc><![CDATA[Synthetic key configuration.]]></jxb:javadoc></jxb:class></appinfo></annotation>
|
||||
<complexType name="SyntheticObjectsType">
|
||||
<annotation><appinfo><jxb:class><jxb:javadoc><![CDATA[Synthetic objects configuration.]]></jxb:javadoc></jxb:class></appinfo></annotation>
|
||||
<all>
|
||||
<element name="identities" type="tns:SyntheticIdentitiesType" minOccurs="0" maxOccurs="1">
|
||||
<annotation><appinfo><jxb:property><jxb:javadoc><![CDATA[Synthetic identity configuration]]></jxb:javadoc></jxb:property></appinfo></annotation>
|
||||
|
||||
@ -44,8 +44,7 @@ import java.util.EnumSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* A configuration type for use with the various {@link DSLContext#ddl(Catalog)}
|
||||
* methods.
|
||||
* A configuration type for use with the various {@link Meta#ddl()} methods.
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user