BrightSide Workbench Full Report + Source Code
ContactId.java
Go to the documentation of this file.
1
/*
2
* TurrĂ³ i Cutiller Foundation. License notice.
3
* Copyright (C) 2011 Lluis TurrĂ³ Cutiller <http://www.turro.org/>
4
*
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU Affero General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU Affero General Public License for more details.
14
*
15
* You should have received a copy of the GNU Affero General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
package
org.turro.contacts.util;
19
20
import
org.turro.contacts.Contact;
21
import
org.turro.contacts.db.ContactsPU;
22
import
org.turro.plugin.contacts.IContact;
23
29
@Deprecated
30
public
class
ContactId
implements
java.io.Serializable {
31
32
private
static
final
long
serialVersionUID = -1;
33
34
private
String object;
35
36
public
ContactId
(String
object
) {
37
this.
object
= object;
38
}
39
40
public
String
getRealValue
() {
41
return
object;
42
}
43
44
public
void
setRealValue
(String value) {
45
this.
object
= value;
46
}
47
48
public
Object
getObject
() {
49
if
(
object
==
null
)
return
null
;
50
return
new
ContactsPU
().find(
Contact
.class,
object
);
51
}
52
53
public
void
setObject
(Object
object
) {
54
if
(
object
instanceof
Contact
) {
55
this.
object
= ((Contact)
object
).getId();
56
}
57
}
58
59
public
Object
getValue
() {
60
Contact
contact = (
Contact
)
getObject
();
61
if
(contact !=
null
) {
62
return
contact.
getName
();
63
}
64
return
null
;
65
}
66
67
public
IContact
getIContact
() {
68
Contact
c = (
Contact
)
getObject
();
69
if
(c !=
null
) {
70
return
new
DefaultContact
(c);
71
}
72
return
null
;
73
}
74
75
}
org.turro.contacts.Contact
Definition:
Contact.java:51
org.turro.contacts.Contact.getName
String getName()
Definition:
Contact.java:204
org.turro.contacts.db.ContactsPU
Definition:
ContactsPU.java:42
org.turro.contacts.util.ContactId
Definition:
ContactId.java:30
org.turro.contacts.util.ContactId.setRealValue
void setRealValue(String value)
Definition:
ContactId.java:44
org.turro.contacts.util.ContactId.getRealValue
String getRealValue()
Definition:
ContactId.java:40
org.turro.contacts.util.ContactId.getIContact
IContact getIContact()
Definition:
ContactId.java:67
org.turro.contacts.util.ContactId.ContactId
ContactId(String object)
Definition:
ContactId.java:36
org.turro.contacts.util.ContactId.getObject
Object getObject()
Definition:
ContactId.java:48
org.turro.contacts.util.ContactId.setObject
void setObject(Object object)
Definition:
ContactId.java:53
org.turro.contacts.util.ContactId.getValue
Object getValue()
Definition:
ContactId.java:59
org.turro.contacts.util.DefaultContact
Definition:
DefaultContact.java:67
org.turro.plugin.contacts.IContact
Definition:
elephant/src/main/java/org/turro/plugin/contacts/IContact.java:32
TurroProjects
Public
BrightSide
contacts
src
main
java
org
turro
contacts
util
ContactId.java
Generated on Sun May 8 2022 11:23:25 for BrightSide by
1.9.1