
codegen.spring.repository.vm Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tsl2.nano.generator Show documentation
Show all versions of tsl2.nano.generator Show documentation
velocity template generator through classes or dom
/*
* created by: Generated through velocity template (repository.vm)
* created on: ----/--/-- (not filled with property 'time' to simplify version-diffs)
*
* spring data rest repository
*
* ${copyright}
*/
package ${package};
#define($attKey) KEY_${util.toUpperCase(${att.Name})}#end
#define($attKeyTooltip) KEY_TOOLTIP_${util.toUpperCase(${att.Name})}#end
#define($attName) ATTR_${util.toUpperCase(${att.Name})}#end
import ${class.Clazz.CanonicalName};
import java.util.Set;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
@RepositoryRestResource(collectionResourceRel = "${util.toLowerCase(${class.Name})}s", path = "${util.toLowerCase(${class.Name})}")
public interface ${class.Name}Repository extends PagingAndSortingRepository<${class.Name}, ${idType}> {
#foreach( $att in $class.Attributes)
#if(!${att.type.Name.equals($idType)} || !${att.name.toLowerCase().endsWith("id")})
Set<${class.Name}> findBy${att.NameFU}(${att.type.name} ${att.Name});
#end
#end
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy