2 * This is a common dao with basic CRUD operations and is not limited to any
3 * persistent layer implementation
5 * Copyright (C) 2008 Imran M Yousuf (imyousuf@smartitengineering.com)
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 3 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 package com
.smartitengineering
.exim
.impl
.data
;
21 import com
.smartitengineering
.domain
.annotations
.Eager
;
22 import com
.smartitengineering
.domain
.annotations
.Export
;
23 import com
.smartitengineering
.domain
.annotations
.Id
;
24 import com
.smartitengineering
.domain
.annotations
.Name
;
25 import com
.smartitengineering
.domain
.annotations
.ResourceDomain
;
26 import com
.smartitengineering
.domain
.exim
.DomainSelfExporter
;
27 import java
.io
.IOException
;
28 import java
.io
.OutputStream
;
34 @ResourceDomain(path
= TestResourceDomain
.PATH
,
35 exportAsURIByDefault
= false)
36 public class TestResourceDomain
38 implements DomainSelfExporter
{
40 public static final String SOME_TRANSIENT_PROP
= "someTransientProp";
41 public static final String SOME_BOOL_PROP
= "someBoolProp";
42 public static final String SOME_PROP
= "someProp";
43 public static final String ID
= "id";
44 public static final String SOME_PROP_NAME
= "somePropName";
45 public static final String PATH
= "propDomain";
46 public static final String ID_PREFIX
= "idPrefix";
48 @Id(path
= TestResourceDomain
.ID_PREFIX
)
49 public Integer
getId() {
53 @Name(value
= TestResourceDomain
.SOME_PROP_NAME
)
54 @Export(asObject
=false)
55 public String
getSomeProp() {
56 throw new UnsupportedOperationException("Not supported yet.");
59 @Export(isTransient
=true)
60 public String
getSomeTransientProp() {
61 throw new UnsupportedOperationException("Not supported yet.");
65 public boolean hasSomeBoolProp() {
69 public static String
getStrInstance() {
73 private String
getPrivateString() {
77 protected String
getProtectedString() {
81 public boolean isMIMESupported(String mimeType
) {
82 throw new UnsupportedOperationException("Not supported yet.");
85 public void exportObject(String mimeType
,
86 OutputStream outputStream
)
87 throws IllegalArgumentException
,
89 throw new UnsupportedOperationException("Not supported yet.");