Commit aee2d6ff authored by Matija Obreza's avatar Matija Obreza
Browse files

Added missing ClassPKService method

parent a3a16e18
......@@ -42,4 +42,12 @@ public interface ClassPKService {
ClassPK findByShortName(String classPKShortName);
/**
* Get ClassPK ID for full class name
*
* @param className
* @return
*/
Long getClassPkId(String className);
}
......@@ -97,4 +97,8 @@ public class ClassPKServiceImpl implements ClassPKService {
return classPkRepository.findByShortName(classPKShortName);
}
@Override
public Long getClassPkId(String classname) {
return classPkRepository.getClassPkId(classname);
}
}
......@@ -17,6 +17,7 @@ package org.genesys.blocks.persistence;
import org.genesys.blocks.model.ClassPK;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
/**
......@@ -37,4 +38,7 @@ public interface ClassPKRepository extends JpaRepository<ClassPK, Long> {
ClassPK findByShortName(String shortName);
@Query("select cpk.id from ClassPK cpk where cpk.classname = ?1")
Long getClassPkId(String classname);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment