Examples of fromEncodedString()


Examples of org.apache.isis.core.metamodel.facets.object.encodeable.EncodableFacet.fromEncodedString()

        if (objectAssoc.isOneToManyAssociation()) {
            updateOneToManyAssociation(objectAdapter, (OneToManyAssociation) objectAssoc, (CollectionData) fieldData);

        } else if (objectAssoc.getSpecification().containsFacet(EncodableFacet.class)) {
            final EncodableFacet facet = objectAssoc.getSpecification().getFacet(EncodableFacet.class);
            final ObjectAdapter value = facet.fromEncodedString((String) fieldData);
            ((OneToOneAssociation) objectAssoc).initAssociation(objectAdapter, value);

        } else if (objectAssoc.isOneToOneAssociation()) {
            updateOneToOneAssociation(objectAdapter, (OneToOneAssociation) objectAssoc, (Data) fieldData);
        }
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.object.encodeable.EncodableFacet.fromEncodedString()

            if (association.getSpecification().isEncodeable()) {
                if (fieldValue == null) {
                    ((OneToOneAssociation) association).initAssociation(adapter, null);
                } else {
                    final EncodableFacet encodeableFacet = association.getSpecification().getFacet(EncodableFacet.class);
                    final ObjectAdapter fromEncodedString = encodeableFacet.fromEncodedString((String) fieldValue);
                    ((OneToOneAssociation) association).initAssociation(adapter, fromEncodedString);
                }
            } else if (association instanceof OneToManyAssociation) {
                final JSONArray collection = (JSONArray) fieldValue;
                for (int i = 0; i < collection.length(); i++) {
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.object.encodeable.EncodableFacet.fromEncodedString()

            if (fieldData.equals("null")) {
                association.initAssociation(object, null);
            } else {
                final EncodableFacet encodeableFacet = association.getSpecification().getFacet(EncodableFacet.class);
                final String decryptedData = dataEncrypter.decrypt(fieldData);
                final ObjectAdapter value = encodeableFacet.fromEncodedString(decryptedData);
                association.initAssociation(object, value);
            }
        }
    }
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.object.encodeable.EncodableFacet.fromEncodedString()

    }

    @Override
    public void undo() {
        final EncodableFacet facet = value.getFacet(EncodableFacet.class);
        final Object obj = facet.fromEncodedString(oldValue);
        final ObjectAdapter adapter = getAdapterManager().adapterFor(obj);
        value.setAssociation(object, adapter);
        // have commented this out because it isn't needed; the transaction
        // manager will do this
        // for us on endTransaction. Still, if I'm wrong and it is needed,
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.object.encodeable.EncodableFacet.fromEncodedString()

            return null;
        }
       
        if(objSpec.isEncodeable()) {
            EncodableFacet encodeable = objSpec.getFacet(EncodableFacet.class);
            return encodeable.fromEncodedString(encoded);
        }
       
        try {
            final RootOid oid = RootOidDefault.deStringEncoded(encoded, getOidMarshaller());
            return getAdapterManager().adapterFor(oid);
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.object.encodeable.EncodableFacet.fromEncodedString()

            return null;
        }
       
        if(objSpec.isEncodeable()) {
            EncodableFacet encodeable = objSpec.getFacet(EncodableFacet.class);
            return encodeable.fromEncodedString(encoded);
        }
       
        try {
            final RootOid oid = RootOidDefault.deStringEncoded(encoded, getOidMarshaller());
            return getAdapterManager().adapterFor(oid);
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.object.encodeable.EncodableFacet.fromEncodedString()

            if (fieldData.equals("null")) {
                association.initAssociation(object, null);
            } else {
                final EncodableFacet encodeableFacet = association.getSpecification().getFacet(EncodableFacet.class);
                final String decryptedData = dataEncrypter.decrypt(fieldData);
                final ObjectAdapter value = encodeableFacet.fromEncodedString(decryptedData);
                association.initAssociation(object, value);
            }
        }
    }
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.object.encodeable.EncodableFacet.fromEncodedString()

                    final String valueData = data.value(field.getId());
                    if (valueData != null) {
                        if (valueData.equals("NULL")) {
                            value = null;
                        } else {
                            value = encoder.fromEncodedString(valueData);
                        }
                        ((OneToOneAssociation) field).initAssociation(object, value);
                    }
                } else if (field.isOneToManyAssociation()) {
                    initObjectSetupCollection(object, data, field);
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.object.encodeable.EncodableFacet.fromEncodedString()

        if (objectAsSerializable != null) {
            return IsisContext.getPersistenceSession().getAdapterManager().adapterFor(objectAsSerializable);
        } else {
            final ObjectSpecification spec = IsisContext.getSpecificationLoader().loadSpecification(getClassName());
            final EncodableFacet encodeableFacet = spec.getFacet(EncodableFacet.class);
            return encodeableFacet.fromEncodedString(objectAsEncodedString);
        }
    }

}
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.object.encodeable.EncodableFacet.fromEncodedString()

        if (field.isOneToManyAssociation()) {
            updateOneToManyAssociation(object, (OneToManyAssociation) field, (CollectionData) fieldData);

        } else if (field.getSpecification().containsFacet(EncodableFacet.class)) {
            final EncodableFacet facet = field.getSpecification().getFacet(EncodableFacet.class);
            final ObjectAdapter value = facet.fromEncodedString((String) fieldData);
            ((OneToOneAssociation) field).initAssociation(object, value);

        } else if (field.isOneToOneAssociation()) {
            updateOneToOneAssociation(object, (OneToOneAssociation) field, (Data) fieldData);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.