KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > services > fields > PublicContentFieldEntryState


1 //
2
// ____.
3
// __/\ ______| |__/\. _______
4
// __ .____| | \ | +----+ \
5
// _______| /--| | | - \ _ | : - \_________
6
// \\______: :---| : : | : | \________>
7
// |__\---\_____________:______: :____|____:_____\
8
// /_____|
9
//
10
// . . . i n j a h i a w e t r u s t . . .
11
//
12

13 package org.jahia.services.fields;
14
15 import org.jahia.services.version.ContentObjectEntryState;
16
17 /**
18  * This class is just a bean holding one "entry state information" entity
19  * concerning a single field
20  *
21  * @author NK
22  */

23 public class PublicContentFieldEntryState extends ContentObjectEntryState {
24
25     public PublicContentFieldEntryState (int workflowState,
26                                          int versionID,
27                                          String JavaDoc languageCode) {
28         super (workflowState, versionID, languageCode);
29     }
30
31     public PublicContentFieldEntryState (ContentObjectEntryState contentFieldEntryState) {
32         super (contentFieldEntryState.getWorkflowState (),
33                 contentFieldEntryState.getVersionID (),
34                 contentFieldEntryState.getLanguageCode ());
35     }
36
37     /**
38      * Needed when a PublicContentFieldEntryState is used as a Hashtable key
39      */

40     public boolean equals (Object JavaDoc cfe) {
41         if (cfe instanceof PublicContentFieldEntryState) {
42             if ((((PublicContentFieldEntryState) cfe).getWorkflowState () == getWorkflowState ()) &&
43                     (((PublicContentFieldEntryState) cfe).getVersionID () == getVersionID ()) &&
44                     (((PublicContentFieldEntryState) cfe).getLanguageCode ().equals (
45                             getLanguageCode ())))
46                 return true;
47         }
48         return false;
49     }
50 }
Popular Tags