if (typeDef.getUpdateTime() == null) { typeDef.setUpdateTime(new Date()); ret.setProperty(Constants.TIMESTAMP_PROPERTY_KEY, typeDef.getCreateTime().getTime()); ret.setProperty(Constants.MODIFIED_BY_KEY, getCurrentUser()); ret.setProperty(Constants.MODIFICATION_TIMESTAMP_PROPERTY_KEY, typeDef.getUpdateTime().getTime()); ret.setProperty(Constants.VERSION_PROPERTY_KEY, typeDef.getVersion()); ret.setProperty(Constants.TYPEOPTIONS_PROPERTY_KEY, AtlasType.toJson(typeDef.getOptions()));
if (typeDef.getUpdateTime() == null) { typeDef.setUpdateTime(new Date()); ret.setProperty(Constants.TIMESTAMP_PROPERTY_KEY, typeDef.getCreateTime().getTime()); ret.setProperty(Constants.MODIFIED_BY_KEY, getCurrentUser()); ret.setProperty(Constants.MODIFICATION_TIMESTAMP_PROPERTY_KEY, typeDef.getUpdateTime().getTime()); ret.setProperty(Constants.VERSION_PROPERTY_KEY, typeDef.getVersion()); ret.setProperty(Constants.TYPEOPTIONS_PROPERTY_KEY, AtlasType.toJson(typeDef.getOptions()));
protected AtlasBaseTypeDef(AtlasBaseTypeDef other) { if (other != null) { this.category = other.category; setGuid(other.getGuid()); setCreatedBy(other.getCreatedBy()); setUpdatedBy(other.getUpdatedBy()); setCreateTime(other.getCreateTime()); setUpdateTime(other.getUpdateTime()); setVersion(other.getVersion()); setName(other.getName()); setDescription(other.getDescription()); setTypeVersion(other.getTypeVersion()); setOptions(other.getOptions()); } else { this.category = TypeCategory.PRIMITIVE; setGuid(null); setCreatedBy(null); setUpdatedBy(null); setCreateTime(null); setUpdateTime(null); setVersion(null); setName(null); setDescription(null); setTypeVersion(null); setOptions(null); } }
protected AtlasBaseTypeDef(AtlasBaseTypeDef other) { if (other != null) { this.category = other.category; setGuid(other.getGuid()); setCreatedBy(other.getCreatedBy()); setUpdatedBy(other.getUpdatedBy()); setCreateTime(other.getCreateTime()); setUpdateTime(other.getUpdateTime()); setVersion(other.getVersion()); setName(other.getName()); setDescription(other.getDescription()); setTypeVersion(other.getTypeVersion()); setOptions(other.getOptions()); } else { this.category = TypeCategory.PRIMITIVE; setGuid(null); setCreatedBy(null); setUpdatedBy(null); setCreateTime(null); setUpdateTime(null); setVersion(null); setName(null); setDescription(null); setTypeVersion(null); setOptions(null); } }