Package org.fao.geonet.domain

Examples of org.fao.geonet.domain.Localized


            } else {
                repository = _applicationContext.getBean(_beanName, JpaRepository.class);
            }
            final Class<?> repositoryClass = repository.getClass();

            Localized entity = findEntity(key, repository, repositoryClass);


            if (entity == null) {
                return key;
            }


            String label = entity.getLabel(_langCode);

            if (label == null) {
                return key;
            } else {
                return label;
View Full Code Here


    private Localized findEntity(final String key, final JpaRepository repository, final Class<?> repositoryClass) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {

        Method[] methods = repositoryClass.getMethods();

        Localized entity = null;
        for (Method method : methods) {
            if (method.getName().equals(this._methodName) && method.getParameterTypes().length == 1) {
                try {
                    if (_parameterType.equals("int")) {
                        entity = (Localized) method.invoke(repository, Integer.valueOf(key));
View Full Code Here

TOP

Related Classes of org.fao.geonet.domain.Localized

Copyright © 2018 www.massapicom. 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.