use of org.bimserver.models.store.BooleanType in project BIMserver by opensourceBIM.
the class BimServer method cloneAndAdd.
public Type cloneAndAdd(DatabaseSession session, Type input) throws BimserverDatabaseException {
if (input instanceof BooleanType) {
BooleanType booleanType = session.create(BooleanType.class);
booleanType.setValue(((BooleanType) input).isValue());
session.store(booleanType);
return booleanType;
} else if (input instanceof StringType) {
StringType stringType = session.create(StringType.class);
stringType.setValue(((StringType) input).getValue());
session.store(stringType);
return stringType;
} else if (input instanceof DoubleType) {
DoubleType doubleType = session.create(DoubleType.class);
doubleType.setValue(((DoubleType) input).getValue());
session.store(doubleType);
return doubleType;
} else if (input instanceof LongType) {
LongType longType = session.create(LongType.class);
longType.setValue(((LongType) input).getValue());
session.store(longType);
return longType;
}
return null;
}
Aggregations