org.nuiton.topia.it.mapping.test4.A4Abstract Maven / Gradle / Ivy
package org.nuiton.topia.it.mapping.test4;
import java.util.Collection;
import java.util.Date;
import java.util.LinkedList;
import javax.annotation.Generated;
import org.nuiton.topia.persistence.TopiaEntityVisitor;
import org.nuiton.topia.persistence.TopiaException;
import org.nuiton.topia.persistence.internal.AbstractTopiaEntity;
@Generated(value = "org.nuiton.topia.templates.EntityTransformer", date = "Thu Oct 13 17:59:13 CEST 2016")
public abstract class A4Abstract extends AbstractTopiaEntity implements A4 {
/**
* Nom de l'attribut en BD : strings
*/
protected Collection strings;
/**
* Nom de l'attribut en BD : enumerations
*/
protected Collection enumerations;
/**
* Nom de l'attribut en BD : dates
*/
protected Collection dates;
private static final long serialVersionUID = 7233681941381853744L;
@Override
public void accept(TopiaEntityVisitor visitor) throws TopiaException {
visitor.start(this);
accept0(visitor);
visitor.end(this);
}
protected void accept0(TopiaEntityVisitor visitor) throws TopiaException {
visitor.visit(this, PROPERTY_STRINGS, Collection.class, String.class, strings);
visitor.visit(this, PROPERTY_ENUMERATIONS, Collection.class, E4.class, enumerations);
visitor.visit(this, PROPERTY_DATES, Collection.class, Date.class, dates);
}
@Override
public void addStrings(String strings) {
if (this.strings == null) {
this.strings = new LinkedList();
}
this.strings.add(strings);
}
@Override
public void addAllStrings(Iterable strings) {
if (strings == null) {
return;
}
for (String item : strings) {
addStrings(item);
}
}
@Override
public void setStrings(Collection strings) {
this.strings = strings;
}
@Override
public void removeStrings(String strings) {
if (this.strings == null || !this.strings.remove(strings)) {
throw new IllegalArgumentException("List does not contain given element");
}
}
@Override
public void clearStrings() {
if (this.strings == null) {
return;
}
this.strings.clear();
}
@Override
public Collection getStrings() {
return strings;
}
@Override
public int sizeStrings() {
if (strings == null) {
return 0;
}
return strings.size();
}
@Override
public boolean isStringsEmpty() {
int size = sizeStrings();
return size == 0;
}
@Override
public boolean isStringsNotEmpty() {
boolean empty = isStringsEmpty();
return ! empty;
}
@Override
public boolean containsStrings(String strings) {
boolean contains = this.strings !=null && this.strings.contains(strings);
return contains;
}
@Override
public void addEnumerations(E4 enumerations) {
if (this.enumerations == null) {
this.enumerations = new LinkedList();
}
this.enumerations.add(enumerations);
}
@Override
public void addAllEnumerations(Iterable enumerations) {
if (enumerations == null) {
return;
}
for (E4 item : enumerations) {
addEnumerations(item);
}
}
@Override
public void setEnumerations(Collection enumerations) {
this.enumerations = enumerations;
}
@Override
public void removeEnumerations(E4 enumerations) {
if (this.enumerations == null || !this.enumerations.remove(enumerations)) {
throw new IllegalArgumentException("List does not contain given element");
}
}
@Override
public void clearEnumerations() {
if (this.enumerations == null) {
return;
}
this.enumerations.clear();
}
@Override
public Collection getEnumerations() {
return enumerations;
}
@Override
public int sizeEnumerations() {
if (enumerations == null) {
return 0;
}
return enumerations.size();
}
@Override
public boolean isEnumerationsEmpty() {
int size = sizeEnumerations();
return size == 0;
}
@Override
public boolean isEnumerationsNotEmpty() {
boolean empty = isEnumerationsEmpty();
return ! empty;
}
@Override
public boolean containsEnumerations(E4 enumerations) {
boolean contains = this.enumerations !=null && this.enumerations.contains(enumerations);
return contains;
}
@Override
public void addDates(Date dates) {
if (this.dates == null) {
this.dates = new LinkedList();
}
this.dates.add(dates);
}
@Override
public void addAllDates(Iterable dates) {
if (dates == null) {
return;
}
for (Date item : dates) {
addDates(item);
}
}
@Override
public void setDates(Collection dates) {
this.dates = dates;
}
@Override
public void removeDates(Date dates) {
if (this.dates == null || !this.dates.remove(dates)) {
throw new IllegalArgumentException("List does not contain given element");
}
}
@Override
public void clearDates() {
if (this.dates == null) {
return;
}
this.dates.clear();
}
@Override
public Collection getDates() {
return dates;
}
@Override
public int sizeDates() {
if (dates == null) {
return 0;
}
return dates.size();
}
@Override
public boolean isDatesEmpty() {
int size = sizeDates();
return size == 0;
}
@Override
public boolean isDatesNotEmpty() {
boolean empty = isDatesEmpty();
return ! empty;
}
@Override
public boolean containsDates(Date dates) {
boolean contains = this.dates !=null && this.dates.contains(dates);
return contains;
}
} //A4Abstract
© 2015 - 2024 Weber Informatics LLC | Privacy Policy