public void toPersistenceObj(RegistryObjectType roType, RegistryObject ro) throws XDSException { toPersistenceIdentifiable(roType, ro); ro.setClassifications(new HashSet<Classification>()); ro.setDescription(new HashSet<Description>()); ro.setExternalIdentifiers(new HashSet<ExternalIdentifier>()); ro.setLid(roType.getLid() == null ? ro.getId() : roType.getLid());//TODO if no LID, check if older RegistryObject exists and use this Lid! ro.setObjectType(roType.getObjectType()); ro.setStatus("urn:oasis:names:tc:ebxml-regrep:StatusType:Approved"); copyName(roType.getName(), ro); copyDescriptions(roType.getDescription(), ro); copyClassifications(roType.getClassification(), ro); copyExternalIdentifier(roType.getExternalIdentifier(), ro); //TODO VersionInfo ro.setVersionName("1.0"); ro.setComment("Initial Version"); } public void toPersistenceIdentifiable(IdentifiableType roType, Identifiable ro) {