Examples of ProxiedEntityReference


Examples of com.github.jmkgreen.morphia.mapping.lazy.proxy.ProxiedEntityReference

    }

    private Key<?> getKey(final Object entity, Mapper mapr) {
        try {
            if (entity instanceof ProxiedEntityReference) {
                ProxiedEntityReference proxy = (ProxiedEntityReference) entity;
                return proxy.__getKey();
            }
            MappedClass mappedClass = mapr.getMappedClass(entity);
            Object id = mappedClass.getIdField().get(entity);
            if (id == null)
                throw new MappingException("@Id field cannot be null!");
View Full Code Here

Examples of org.mongodb.morphia.mapping.lazy.proxy.ProxiedEntityReference

    }

    public <T> Key<T> getKey(final T entity) {
        T unwrapped = entity;
        if (unwrapped instanceof ProxiedEntityReference) {
            final ProxiedEntityReference proxy = (ProxiedEntityReference) unwrapped;
            return (Key<T>) proxy.__getKey();
        }

        unwrapped = ProxyHelper.unwrap(unwrapped);
        if (unwrapped instanceof Key) {
            return (Key<T>) unwrapped;
View Full Code Here

Examples of org.mongodb.morphia.mapping.lazy.proxy.ProxiedEntityReference

    }

    private Key<?> getKey(final Object entity, final Mapper mapper) {
        try {
            if (entity instanceof ProxiedEntityReference) {
                final ProxiedEntityReference proxy = (ProxiedEntityReference) entity;
                return proxy.__getKey();
            }
            final MappedClass mappedClass = mapper.getMappedClass(entity);
            final Object id = mappedClass.getIdField().get(entity);
            if (id == null) {
                throw new MappingException("@Id field cannot be null!");
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.