| |||||||||||||||||
Source File | Conditionals | Statements | Methods | TOTAL | |||||||||||||
Seasar.Dao.Tests.Interceptors\IEmployeeDao.cs | - | - | - | - |
|
1 | #region Copyright | |
2 | /* | |
3 | * Copyright 2005 the Seasar Foundation and the Others. | |
4 | * | |
5 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
6 | * you may not use this file except in compliance with the License. | |
7 | * You may obtain a copy of the License at | |
8 | * | |
9 | * http://www.apache.org/licenses/LICENSE-2.0 | |
10 | * | |
11 | * Unless required by applicable law or agreed to in writing, software | |
12 | * distributed under the License is distributed on an "AS IS" BASIS, | |
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, | |
14 | * either express or implied. See the License for the specific language | |
15 | * governing permissions and limitations under the License. | |
16 | */ | |
17 | #endregion | |
18 | ||
19 | using System; | |
20 | using System.Collections; | |
21 | using System.Data.SqlTypes;using Seasar.Dao.Attrs; | |
22 | using Nullables; | |
23 | ||
24 | namespace Seasar.Dao.Tests.Interceptors | |
25 | { | |
26 | [Bean(typeof(Employee))] | |
27 | public interface IEmployeeDao | |
28 | { | |
29 | /// <summary> | |
30 | /// 全ての従業員を取得する | |
31 | /// </summary> | |
32 | /// <returns>Employeeのリスト</returns> | |
33 | IList GetAllEmployees(); | |
34 | ||
35 | /// <summary> | |
36 | /// 従業員番号から従業員を取得する | |
37 | /// </summary> | |
38 | /// <param name="empno">従業員番号</param> | |
39 | /// <returns>従業員</returns> | |
40 | [Query("empno=/*empno*/")] | |
41 | Employee GetEmployee(int empno); | |
42 | // | |
43 | // /// <summary> | |
44 | // /// | |
45 | // /// </summary> | |
46 | // /// <param name="deptno"></param> | |
47 | // /// <returns></returns> | |
48 | // Employee[] GetEmployeesByDeptno(int deptno); | |
49 | ||
50 | /// <summary> | |
51 | /// 従業員の件数を取得する | |
52 | /// </summary> | |
53 | /// <returns>従業員数</returns> | |
54 | [Sql("select count(*) from EMP")] | |
55 | int GetCount(); | |
56 | ||
57 | /// <summary> | |
58 | /// 従業員を追加する | |
59 | /// </summary> | |
60 | /// <param name="empno">従業員番号</param> | |
61 | /// <param name="ename">従業員名</param> | |
62 | /// <returns>追加件数</returns> | |
63 | int Insert(int empno, String ename); | |
64 | ||
65 | /// <summary> | |
66 | /// 従業員を更新する | |
67 | /// </summary> | |
68 | /// <param name="employee">従業員</param> | |
69 | /// <returns>更新件数</returns> | |
70 | int Update(Employee employee); | |
71 | ||
72 | [Sql("select empno from EMP /*IF emp.Ename != null*/ where ename=/*emp.Ename*/'1' /*END*/")] | |
73 | NullableInt32 GetEmpnoByEmp(Employee emp); | |
74 | ||
75 | [Sql("select empno from EMP /*IF hoge.Parent.Val != null*/ where ename=/*hoge.Parent.Val*/'1' /*END*/")] | |
76 | SqlInt32 GetEmpnoByHoge(Hoge hoge); | |
77 | ||
78 | [Sql("select empno from EMP where ename=/*hoge.Parent.Val*/'1'")] | |
79 | SqlInt32 GetEmpnoByHoge2(Hoge hoge); | |
80 | ||
81 | } | |
82 | } | |
83 |
|