@Override protected Partition doPopulateEntry(Map<String, Serializable> properties) throws Exception { Partition partition = super.doPopulateEntry(properties); return partition; }
@Override protected void doReadObject(ObjectInputStream s) throws Exception { super.doReadObject(s); this.configurationName = s.readObject().toString(); }
@Override protected void doWriteObject(ObjectOutputStream s) throws Exception { super.doWriteObject(s); s.writeObject(configurationName); }
@Override protected void doPopulateProperties(Map<String, Serializable> properties) throws Exception { T attributedType = getEntry(); properties.put("id", attributedType.getId()); for (Property<Serializable> property: getAttributedProperties(attributedType)) { Serializable value = property.getValue(getEntry()); if (value != null) { properties.put(property.getName(), value); } } }
@Override protected T doPopulateEntry(Map<String, Serializable> properties) throws Exception { T attributedType = doCreateInstance(properties); attributedType.setId(properties.get("id").toString()); for (Property<Serializable> property: getAttributedProperties(attributedType)) { Serializable value = properties.get(property.getName()); if (value != null) { property.setValue(attributedType, value); } } return attributedType; }
@Override protected void doPopulateProperties(Map<String, Serializable> properties) throws Exception { super.doPopulateProperties(properties); Partition partition = getEntry(); properties.put("name", partition.getName()); }
protected T doCreateInstance(Map<String, Serializable> properties) throws Exception { return (T) newInstance(getClass(), getType()); }
public String getId() { return getEntry().getId(); }
@Override protected void doPopulateProperties(Map<String, Serializable> properties) throws Exception { T attributedType = getEntry(); properties.put("id", attributedType.getId()); for (Property<Serializable> property: getAttributedProperties(attributedType)) { Serializable value = property.getValue(getEntry()); if (value != null) { properties.put(property.getName(), value); } } }
@Override protected T doPopulateEntry(Map<String, Serializable> properties) throws Exception { T attributedType = doCreateInstance(properties); attributedType.setId(properties.get("id").toString()); for (Property<Serializable> property: getAttributedProperties(attributedType)) { Serializable value = properties.get(property.getName()); if (value != null) { property.setValue(attributedType, value); } } return attributedType; }
@Override protected void doPopulateProperties(Map<String, Serializable> properties) throws Exception { super.doPopulateProperties(properties); Partition partition = getEntry(); properties.put("name", partition.getName()); }
protected T doCreateInstance(Map<String, Serializable> properties) throws Exception { return (T) newInstance(getClass(), getType()); }
public String getId() { return getEntry().getId(); }
@Override protected Partition doPopulateEntry(Map<String, Serializable> properties) throws Exception { Partition partition = super.doPopulateEntry(properties); return partition; }
@Override protected void doPopulateProperties(Map<String, Serializable> properties) throws Exception { super.doPopulateProperties(properties); IdentityType identityType = getEntry(); if (identityType.getPartition() == null) { throw new IllegalStateException("Partition Null"); } if (identityType.getPartition().getId() == null) { throw new IllegalStateException("Partition ID Null"); } properties.put("partitionId", identityType.getPartition().getId()); properties.put("partitionType", identityType.getPartition().getClass().getName()); properties.put("createdDate", identityType.getCreatedDate()); if (identityType.getExpirationDate() != null) { properties.put("expirationDate", identityType.getExpirationDate()); } properties.put("enabled", identityType.isEnabled()); } }
@Override protected void doReadObject(ObjectInputStream s) throws Exception { super.doReadObject(s); this.configurationName = s.readObject().toString(); }
@Override protected void doWriteObject(ObjectOutputStream s) throws Exception { super.doWriteObject(s); s.writeObject(configurationName); }
@Override protected IdentityType doPopulateEntry(Map<String, Serializable> properties) throws Exception { IdentityType identityType = super.doPopulateEntry(properties); String partitionType = properties.get("partitionType").toString(); String partitionId = properties.get("partitionId").toString(); Partition partition = (Partition) Class.forName(partitionType).getConstructor(new Class[]{String.class}).newInstance(""); partition.setId(partitionId); identityType.setPartition(partition); identityType.setCreatedDate((Date) properties.get("createdDate")); identityType.setExpirationDate((Date) properties.get("expirationDate")); identityType.setEnabled((Boolean) properties.get("enabled")); return identityType; }
@Override protected void doPopulateProperties(Map<String, Serializable> properties) throws Exception { super.doPopulateProperties(properties); IdentityType identityType = getEntry(); if (identityType.getPartition() == null) { throw new IllegalStateException("Partition Null"); } if (identityType.getPartition().getId() == null) { throw new IllegalStateException("Partition ID Null"); } properties.put("partitionId", identityType.getPartition().getId()); properties.put("partitionType", identityType.getPartition().getClass().getName()); properties.put("createdDate", identityType.getCreatedDate()); if (identityType.getExpirationDate() != null) { properties.put("expirationDate", identityType.getExpirationDate()); } properties.put("enabled", identityType.isEnabled()); } }
@Override protected IdentityType doPopulateEntry(Map<String, Serializable> properties) throws Exception { IdentityType identityType = super.doPopulateEntry(properties); String partitionType = properties.get("partitionType").toString(); String partitionId = properties.get("partitionId").toString(); Partition partition = (Partition) Class.forName(partitionType).getConstructor(new Class[]{String.class}).newInstance(""); partition.setId(partitionId); identityType.setPartition(partition); identityType.setCreatedDate((Date) properties.get("createdDate")); identityType.setExpirationDate((Date) properties.get("expirationDate")); identityType.setEnabled((Boolean) properties.get("enabled")); return identityType; }