mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
No effective change - param always true
This commit is contained in:
@@ -792,12 +792,12 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
|
||||
}
|
||||
|
||||
// mark this property as unidirectional
|
||||
oneToMany.setUnidirectional(true);
|
||||
oneToMany.setUnidirectional();
|
||||
|
||||
// create the 'shadow' unidirectional property
|
||||
// which is put on the target descriptor
|
||||
DeployBeanPropertyAssocOne<?> unidirectional = new DeployBeanPropertyAssocOne(targetDesc, owningType);
|
||||
unidirectional.setUndirectionalShadow(true);
|
||||
unidirectional.setUndirectionalShadow();
|
||||
unidirectional.setNullable(false);
|
||||
unidirectional.setDbRead(true);
|
||||
unidirectional.setDbInsertable(true);
|
||||
|
||||
@@ -143,8 +143,8 @@ public class DeployBeanDescriptor<T> {
|
||||
/**
|
||||
* Set to true for @History entity beans that have history.
|
||||
*/
|
||||
public void setHistorySupport(boolean historySupport) {
|
||||
this.historySupport = historySupport;
|
||||
public void setHistorySupport() {
|
||||
this.historySupport = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -279,15 +279,15 @@ public class DeployBeanProperty {
|
||||
/**
|
||||
* Mark this property as a placeholder for a unidirectional relationship.
|
||||
*/
|
||||
public void setUndirectionalShadow(boolean undirectionalShadow) {
|
||||
this.undirectionalShadow = undirectionalShadow;
|
||||
public void setUndirectionalShadow() {
|
||||
this.undirectionalShadow = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark this property as mapping to the discriminator column.
|
||||
*/
|
||||
public void setDiscriminator(boolean discriminator) {
|
||||
this.discriminator = discriminator;
|
||||
public void setDiscriminator() {
|
||||
this.discriminator = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -307,8 +307,8 @@ public class DeployBeanProperty {
|
||||
/**
|
||||
* Set to true when the property is encrypted in java rather than in the DB.
|
||||
*/
|
||||
public void setLocalEncrypted(boolean localEncrypted) {
|
||||
this.localEncrypted = localEncrypted;
|
||||
public void setLocalEncrypted() {
|
||||
this.localEncrypted = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -460,8 +460,8 @@ public class DeployBeanProperty {
|
||||
return naturalKey;
|
||||
}
|
||||
|
||||
public void setNaturalKey(boolean naturalKey) {
|
||||
this.naturalKey = naturalKey;
|
||||
public void setNaturalKey() {
|
||||
this.naturalKey = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -516,8 +516,8 @@ public class DeployBeanProperty {
|
||||
/**
|
||||
* Set if this is a version column used for concurrency checking.
|
||||
*/
|
||||
public void setVersionColumn(boolean isVersionColumn) {
|
||||
this.versionColumn = isVersionColumn;
|
||||
public void setVersionColumn() {
|
||||
this.versionColumn = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -741,8 +741,8 @@ public class DeployBeanProperty {
|
||||
/**
|
||||
* Mark the property explicitly as a transient property.
|
||||
*/
|
||||
public void setTransient(boolean isTransient) {
|
||||
this.isTransient = isTransient;
|
||||
public void setTransient() {
|
||||
this.isTransient = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -773,8 +773,8 @@ public class DeployBeanProperty {
|
||||
/**
|
||||
* Set to true if this is included in the unique id.
|
||||
*/
|
||||
public void setId(boolean id) {
|
||||
this.id = id;
|
||||
public void setId() {
|
||||
this.id = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -788,8 +788,8 @@ public class DeployBeanProperty {
|
||||
/**
|
||||
* Set to true if this is an embedded property.
|
||||
*/
|
||||
public void setEmbedded(boolean embedded) {
|
||||
this.embedded = embedded;
|
||||
public void setEmbedded() {
|
||||
this.embedded = true;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
@@ -800,8 +800,8 @@ public class DeployBeanProperty {
|
||||
return indexed;
|
||||
}
|
||||
|
||||
public void setIndexed(boolean indexed) {
|
||||
this.indexed = indexed;
|
||||
public void setIndexed() {
|
||||
this.indexed = true;
|
||||
}
|
||||
|
||||
public String getIndexName() {
|
||||
@@ -816,7 +816,7 @@ public class DeployBeanProperty {
|
||||
return excludedFromHistory;
|
||||
}
|
||||
|
||||
public void setExcludedFromHistory(boolean excludedFromHistory) {
|
||||
this.excludedFromHistory = excludedFromHistory;
|
||||
public void setExcludedFromHistory() {
|
||||
this.excludedFromHistory = true;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -78,8 +78,8 @@ public class DeployBeanPropertyAssocMany<T> extends DeployBeanPropertyAssoc<T> {
|
||||
/**
|
||||
* Set to true if this is a many to many.
|
||||
*/
|
||||
public void setManyToMany(boolean isManyToMany) {
|
||||
this.manyToMany = isManyToMany;
|
||||
public void setManyToMany() {
|
||||
this.manyToMany = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -106,8 +106,8 @@ public class DeployBeanPropertyAssocMany<T> extends DeployBeanPropertyAssoc<T> {
|
||||
/**
|
||||
* Set to true if this is a unidirectional relationship.
|
||||
*/
|
||||
public void setUnidirectional(boolean unidirectional) {
|
||||
this.unidirectional = unidirectional;
|
||||
public void setUnidirectional() {
|
||||
this.unidirectional = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+4
-4
@@ -49,8 +49,8 @@ public class DeployBeanPropertyAssocOne<T> extends DeployBeanPropertyAssoc<T> {
|
||||
/**
|
||||
* Set to true if this is a OneToOne.
|
||||
*/
|
||||
public void setOneToOne(boolean oneToOne) {
|
||||
this.oneToOne = oneToOne;
|
||||
public void setOneToOne() {
|
||||
this.oneToOne = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -64,8 +64,8 @@ public class DeployBeanPropertyAssocOne<T> extends DeployBeanPropertyAssoc<T> {
|
||||
* Set to true if this is the exported side of a OneToOne. This means
|
||||
* it doesn't 'own' the foreign key column. A OneToMany without the many.
|
||||
*/
|
||||
public void setOneToOneExported(boolean oneToOneExported) {
|
||||
this.oneToOneExported = oneToOneExported;
|
||||
public void setOneToOneExported() {
|
||||
this.oneToOneExported = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -90,7 +90,7 @@ public class DeployBeanPropertyLists {
|
||||
// using RawSql queries with inheritance
|
||||
String discriminatorColumn = inheritInfo.getDiscriminatorColumn();
|
||||
DeployBeanProperty discDeployProp = new DeployBeanProperty(deploy, String.class, new ScalarTypeString(), null);
|
||||
discDeployProp.setDiscriminator(true);
|
||||
discDeployProp.setDiscriminator();
|
||||
discDeployProp.setName(discriminatorColumn);
|
||||
discDeployProp.setDbColumn(discriminatorColumn);
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ public class AnnotationAssocManys extends AnnotationParser {
|
||||
}
|
||||
|
||||
if (get(prop, HistoryExclude.class) != null) {
|
||||
prop.setExcludedFromHistory(true);
|
||||
prop.setExcludedFromHistory();
|
||||
}
|
||||
|
||||
OrderBy orderBy = get(prop, OrderBy.class);
|
||||
@@ -280,7 +280,7 @@ public class AnnotationAssocManys extends AnnotationParser {
|
||||
throw new RuntimeException(msg);
|
||||
}
|
||||
|
||||
manyProp.setManyToMany(true);
|
||||
manyProp.setManyToMany();
|
||||
manyProp.setModifyListenMode(ModifyListenMode.ALL);
|
||||
manyProp.setBeanTable(assoc);
|
||||
manyProp.getTableJoin().setType(SqlJoinType.OUTER);
|
||||
|
||||
@@ -66,8 +66,8 @@ public class AnnotationAssocOnes extends AnnotationParser {
|
||||
}
|
||||
EmbeddedId emId = get(prop, EmbeddedId.class);
|
||||
if (emId != null) {
|
||||
prop.setEmbedded(true);
|
||||
prop.setId(true);
|
||||
prop.setEmbedded();
|
||||
prop.setId();
|
||||
prop.setNullable(false);
|
||||
}
|
||||
Column column = get(prop, Column.class);
|
||||
@@ -80,8 +80,8 @@ public class AnnotationAssocOnes extends AnnotationParser {
|
||||
// May as well check for Id. Makes sense to me.
|
||||
Id id = get(prop, Id.class);
|
||||
if (id != null) {
|
||||
prop.setEmbedded(true);
|
||||
prop.setId(true);
|
||||
prop.setEmbedded();
|
||||
prop.setId();
|
||||
prop.setNullable(false);
|
||||
}
|
||||
|
||||
@@ -171,14 +171,14 @@ public class AnnotationAssocOnes extends AnnotationParser {
|
||||
|
||||
private void readOneToOne(OneToOne propAnn, DeployBeanPropertyAssocOne<?> prop) {
|
||||
|
||||
prop.setOneToOne(true);
|
||||
prop.setOneToOne();
|
||||
prop.setDbInsertable(true);
|
||||
prop.setDbUpdateable(true);
|
||||
prop.setNullable(propAnn.optional());
|
||||
prop.setFetchType(propAnn.fetch());
|
||||
prop.setMappedBy(propAnn.mappedBy());
|
||||
if (!"".equals(propAnn.mappedBy())) {
|
||||
prop.setOneToOneExported(true);
|
||||
prop.setOneToOneExported();
|
||||
}
|
||||
|
||||
setCascadeTypes(propAnn.cascade(), prop.getCascadeInfo());
|
||||
@@ -194,7 +194,7 @@ public class AnnotationAssocOnes extends AnnotationParser {
|
||||
|
||||
private void readEmbedded(DeployBeanPropertyAssocOne<?> prop) {
|
||||
|
||||
prop.setEmbedded(true);
|
||||
prop.setEmbedded();
|
||||
prop.setDbInsertable(true);
|
||||
prop.setDbUpdateable(true);
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ public class AnnotationClass extends AnnotationParser {
|
||||
|
||||
History history = cls.getAnnotation(History.class);
|
||||
if (history != null) {
|
||||
descriptor.setHistorySupport(true);
|
||||
descriptor.setHistorySupport();
|
||||
}
|
||||
|
||||
UpdateMode updateMode = cls.getAnnotation(UpdateMode.class);
|
||||
@@ -144,7 +144,7 @@ public class AnnotationClass extends AnnotationParser {
|
||||
String propName = cacheStrategy.naturalKey().trim();
|
||||
DeployBeanProperty beanProperty = descriptor.getBeanProperty(propName);
|
||||
if (beanProperty != null) {
|
||||
beanProperty.setNaturalKey(true);
|
||||
beanProperty.setNaturalKey();
|
||||
cacheOptions.setNaturalKey(propName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,20 +78,20 @@ public class AnnotationFields extends AnnotationParser {
|
||||
|
||||
Id id = get(prop, Id.class);
|
||||
if (id != null) {
|
||||
prop.setId(true);
|
||||
prop.setId();
|
||||
prop.setNullable(false);
|
||||
}
|
||||
|
||||
EmbeddedId embeddedId = get(prop, EmbeddedId.class);
|
||||
if (embeddedId != null) {
|
||||
prop.setId(true);
|
||||
prop.setId();
|
||||
prop.setNullable(false);
|
||||
prop.setEmbedded(true);
|
||||
prop.setEmbedded();
|
||||
}
|
||||
|
||||
if (prop instanceof DeployBeanPropertyAssocOne<?>) {
|
||||
if (prop.isId() && !prop.isEmbedded()) {
|
||||
prop.setEmbedded(true);
|
||||
prop.setEmbedded();
|
||||
}
|
||||
readEmbeddedAttributeOverrides((DeployBeanPropertyAssocOne<?>) prop);
|
||||
}
|
||||
@@ -186,7 +186,7 @@ public class AnnotationFields extends AnnotationParser {
|
||||
Version version = get(prop, Version.class);
|
||||
if (version != null) {
|
||||
// explicitly specify a version column
|
||||
prop.setVersionColumn(true);
|
||||
prop.setVersionColumn();
|
||||
generatedPropFactory.setVersion(prop);
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ public class AnnotationFields extends AnnotationParser {
|
||||
}
|
||||
|
||||
if (get(prop, HistoryExclude.class) != null) {
|
||||
prop.setExcludedFromHistory(true);
|
||||
prop.setExcludedFromHistory();
|
||||
}
|
||||
|
||||
if (validationAnnotations) {
|
||||
@@ -265,7 +265,7 @@ public class AnnotationFields extends AnnotationParser {
|
||||
prop.setDbRead(false);
|
||||
prop.setDbInsertable(false);
|
||||
prop.setDbUpdateable(false);
|
||||
prop.setTransient(true);
|
||||
prop.setTransient();
|
||||
}
|
||||
|
||||
if (!prop.isTransient()) {
|
||||
@@ -286,7 +286,7 @@ public class AnnotationFields extends AnnotationParser {
|
||||
if (hasRelationshipItem(prop)) {
|
||||
throw new RuntimeException("Can't use Index on foreign key relationships.");
|
||||
}
|
||||
prop.setIndexed(true);
|
||||
prop.setIndexed();
|
||||
prop.setIndexName(index.value());
|
||||
}
|
||||
}
|
||||
@@ -318,7 +318,7 @@ public class AnnotationFields extends AnnotationParser {
|
||||
DataEncryptSupport support = createDataEncryptSupport(prop);
|
||||
ScalarTypeBytesEncrypted encryptedScalarType = new ScalarTypeBytesEncrypted(baseType, support);
|
||||
prop.setScalarType(encryptedScalarType);
|
||||
prop.setLocalEncrypted(true);
|
||||
prop.setLocalEncrypted();
|
||||
return;
|
||||
|
||||
}
|
||||
@@ -339,7 +339,7 @@ public class AnnotationFields extends AnnotationParser {
|
||||
}
|
||||
|
||||
prop.setScalarType(createScalarType(prop, st));
|
||||
prop.setLocalEncrypted(true);
|
||||
prop.setLocalEncrypted();
|
||||
if (dbLen > 0) {
|
||||
prop.setDbLength(dbLen);
|
||||
}
|
||||
@@ -370,7 +370,7 @@ public class AnnotationFields extends AnnotationParser {
|
||||
|
||||
private void readId(DeployBeanProperty prop) {
|
||||
|
||||
prop.setId(true);
|
||||
prop.setId();
|
||||
prop.setNullable(false);
|
||||
|
||||
if (prop.getPropertyType().equals(UUID.class)) {
|
||||
|
||||
@@ -25,7 +25,7 @@ public class TransientProperties {
|
||||
DeployBeanProperty prop = props.get(i);
|
||||
if (!prop.isDbRead() && !prop.isDbInsertable() && !prop.isDbUpdateable()) {
|
||||
// non-transient...
|
||||
prop.setTransient(true);
|
||||
prop.setTransient();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public class TransientProperties {
|
||||
DeployBeanPropertyAssocOne<?> prop = ones.get(i);
|
||||
if (prop.getBeanTable() == null) {
|
||||
if (!prop.isEmbedded()) {
|
||||
prop.setTransient(true);
|
||||
prop.setTransient();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -43,7 +43,7 @@ public class TransientProperties {
|
||||
for (int i = 0; i < manys.size(); i++) {
|
||||
DeployBeanPropertyAssocMany<?> prop = manys.get(i);
|
||||
if (prop.getBeanTable() == null) {
|
||||
prop.setTransient(true);
|
||||
prop.setTransient();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user