[LIB-9] Rename chesshog-dbetude module
[chesshog.git] / chesshog-dbetude / src / main / java / org / hedgecode / chess / domain / EtudeAdapter.java
1 /*
2  * Copyright (c) 2018. Developed by Hedgecode.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *   http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package org.hedgecode.chess.domain;
18
19 import java.math.BigInteger;
20 import java.util.Date;
21
22 /**
23  *
24  *
25  * @author Dmitry Samoshin aka gotty
26  */
27 public interface EtudeAdapter<TargetType> extends Adapter<TargetType> {
28
29     void setId(TargetType target, Long id);
30     void setHash(TargetType target, BigInteger hash);
31     void setName(TargetType target, String name);
32     void setEtudeType(TargetType target, EtudeType etudeType);
33     void setAuthor(TargetType target, Author author);
34     void setAuthorName(TargetType target, String authorName);
35     void setFen(TargetType target, String fen);
36     void setPgn(TargetType target, String pgn);
37     void setBlob(TargetType target, byte[] blob);
38     void setDate(TargetType target, Date date);
39     void setDescription(TargetType target, String description);
40
41     abstract class Empty<TargetType> implements EtudeAdapter<TargetType> {
42
43         @Override
44         public void setId(TargetType target, Long id) {
45         }
46
47         @Override
48         public void setHash(TargetType target, BigInteger hash) {
49         }
50
51         @Override
52         public void setName(TargetType target, String name) {
53         }
54
55         @Override
56         public void setEtudeType(TargetType target, EtudeType etudeType) {
57         }
58
59         @Override
60         public void setAuthor(TargetType target, Author author) {
61         }
62
63         @Override
64         public void setAuthorName(TargetType target, String authorName) {
65         }
66
67         @Override
68         public void setFen(TargetType target, String fen) {
69         }
70
71         @Override
72         public void setPgn(TargetType target, String pgn) {
73         }
74
75         @Override
76         public void setBlob(TargetType target, byte[] blob) {
77         }
78
79         @Override
80         public void setDate(TargetType target, Date date) {
81         }
82
83         @Override
84         public void setDescription(TargetType target, String description) {
85         }
86     }
87
88 }