
fr.xebia.extras.selma.beans.PersonMapperSelmaGeneratedClass Maven / Gradle / Ivy
The newest version!
// GENERATED BY S3LM4
package fr.xebia.extras.selma.beans;
public final class PersonMapperSelmaGeneratedClass
implements PersonMapper {
/**
* Single constructor
*/
public PersonMapperSelmaGeneratedClass() {
}
/**
* Mapping method overridden by Selma
*/
@Override
public final PersonDto asPersonDto(Person in) {
fr.xebia.extras.selma.beans.PersonDto out = null;
if (in != null) {
out = new fr.xebia.extras.selma.beans.PersonDto();
if (in.getTags() != null) {
java.util.ArrayList atagsTmpCollection = new java.util.ArrayList(in.getTags().size());
out.setTags(atagsTmpCollection);
for (java.lang.String atagsItem : in.getTags()) {
atagsTmpCollection.add(atagsItem);
}
}
else {
out.setTags(null);
}
if (in.getBirthDay() != null) {
out.setBirthDay(new java.util.Date(in.getBirthDay().getTime()));
}
else {
out.setBirthDay(null);
}
out.setAge(in.getAge());
if (in.getIndices() != null) {
java.lang.Long[] aindicesTmpArray = new java.lang.Long[in.getIndices().length];
int aindicesTotalCount = in.getIndices().length;
out.setIndices(aindicesTmpArray);
for (int aindicesIndex = 0 ; aindicesIndex < aindicesTotalCount; aindicesIndex++) {
aindicesTmpArray[aindicesIndex] = in.getIndices()[aindicesIndex];
}
}
else {
out.setIndices(null);
}
out.setLastName(in.getLastName());
out.setFirstName(in.getFirstName());
}
return out;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy