|
|
|
@ -96,7 +96,7 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public BasicPersistentEntity(TypeInformation<T> information, Comparator<P> comparator) { |
|
|
|
public BasicPersistentEntity(TypeInformation<T> information, Comparator<P> comparator) { |
|
|
|
|
|
|
|
|
|
|
|
Assert.notNull(information); |
|
|
|
Assert.notNull(information, "Information must not be null!"); |
|
|
|
|
|
|
|
|
|
|
|
this.information = information; |
|
|
|
this.information = information; |
|
|
|
this.properties = new ArrayList<P>(); |
|
|
|
this.properties = new ArrayList<P>(); |
|
|
|
@ -188,7 +188,7 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void addPersistentProperty(P property) { |
|
|
|
public void addPersistentProperty(P property) { |
|
|
|
|
|
|
|
|
|
|
|
Assert.notNull(property); |
|
|
|
Assert.notNull(property, "Property must not be null!"); |
|
|
|
|
|
|
|
|
|
|
|
if (properties.contains(property)) { |
|
|
|
if (properties.contains(property)) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
@ -323,7 +323,7 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void doWithProperties(PropertyHandler<P> handler) { |
|
|
|
public void doWithProperties(PropertyHandler<P> handler) { |
|
|
|
|
|
|
|
|
|
|
|
Assert.notNull(handler); |
|
|
|
Assert.notNull(handler, "Handler must not be null!"); |
|
|
|
|
|
|
|
|
|
|
|
for (P property : properties) { |
|
|
|
for (P property : properties) { |
|
|
|
if (!property.isTransient() && !property.isAssociation()) { |
|
|
|
if (!property.isTransient() && !property.isAssociation()) { |
|
|
|
@ -339,7 +339,7 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void doWithProperties(SimplePropertyHandler handler) { |
|
|
|
public void doWithProperties(SimplePropertyHandler handler) { |
|
|
|
|
|
|
|
|
|
|
|
Assert.notNull(handler); |
|
|
|
Assert.notNull(handler, "Handler must not be null!"); |
|
|
|
|
|
|
|
|
|
|
|
for (PersistentProperty<?> property : properties) { |
|
|
|
for (PersistentProperty<?> property : properties) { |
|
|
|
if (!property.isTransient() && !property.isAssociation()) { |
|
|
|
if (!property.isTransient() && !property.isAssociation()) { |
|
|
|
@ -354,7 +354,7 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void doWithAssociations(AssociationHandler<P> handler) { |
|
|
|
public void doWithAssociations(AssociationHandler<P> handler) { |
|
|
|
|
|
|
|
|
|
|
|
Assert.notNull(handler); |
|
|
|
Assert.notNull(handler, "Handler must not be null!"); |
|
|
|
|
|
|
|
|
|
|
|
for (Association<P> association : associations) { |
|
|
|
for (Association<P> association : associations) { |
|
|
|
handler.doWithAssociation(association); |
|
|
|
handler.doWithAssociation(association); |
|
|
|
@ -367,7 +367,7 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void doWithAssociations(SimpleAssociationHandler handler) { |
|
|
|
public void doWithAssociations(SimpleAssociationHandler handler) { |
|
|
|
|
|
|
|
|
|
|
|
Assert.notNull(handler); |
|
|
|
Assert.notNull(handler, "Handler must not be null!"); |
|
|
|
|
|
|
|
|
|
|
|
for (Association<? extends PersistentProperty<?>> association : associations) { |
|
|
|
for (Association<? extends PersistentProperty<?>> association : associations) { |
|
|
|
handler.doWithAssociation(association); |
|
|
|
handler.doWithAssociation(association); |
|
|
|
|