1 package jp.sourceforge.ea2ddl.dao.exbhv;
\r
3 import javax.persistence.EntityNotFoundException;
\r
5 import jp.sourceforge.ea2ddl.dao.cbean.TPackageCB;
\r
6 import jp.sourceforge.ea2ddl.dao.exentity.TPackage;
\r
9 * The behavior of t_package.
\r
11 * You can implement your original methods here. This class is NOT overrided
\r
12 * when re-generating.
\r
15 * @author DBFlute(AutoGenerator)
\r
17 public class TPackageBhv extends jp.sourceforge.ea2ddl.dao.bsbhv.BsTPackageBhv {
\r
20 * パッケージツリーから対象のパッケージオブジェクトを検索する。
\r
22 * @param packageTree
\r
26 public TPackage selectPackage(String packageTree) {
\r
27 final String[] packageNames = packageTree.split("[/.]");
\r
29 TPackage pkg = null;
\r
30 for (int i = 0; i < packageNames.length; i++) {
\r
31 final TPackageCB cb = new TPackageCB();
\r
33 cb.query().setParentId_Equal(pkg.getPackageId());
\r
35 cb.query().setName_Equal(packageNames[i]);
\r
36 pkg = selectEntity(cb);
\r
38 throw new EntityNotFoundException("Package " + packageNames[i] + " in " + packageTree
\r
39 + " is not found.");
\r