Source code: com/flexstor/ejb/importrecord/persist/DisguiseRecordPersist.java
1 /*
2 * DisguiseRecordPersist.java
3 *
4 * Copyright $Date: 2003/08/11 02:22:33 $ FLEXSTOR.net Inc.
5 *
6 * This work is licensed for use and distribution under license terms found at
7 * http://www.flexstor.org/license.html
8 *
9 */
10
11 package com.flexstor.ejb.importrecord.persist;
12
13 import com.flexstor.common.data.ejb.disguiserecord.DisguiseRecordData;
14 import com.flexstor.common.exceptions.ejb.EjbException;
15 import com.flexstor.ejb.EjbObject;
16
17 /**
18 *
19 * <P>
20 * DisguiseRecordPersist <BR>
21 * <BLOCKQUOTE>
22 * Inserts assets in the database. <BR>
23 * The DisguiseRecordPersist bean will also take care of creating buckets and elements <BR>
24 * for those new assets as well as inserting role information for each of them. <BR>
25 * The bean will update asset and role information if the record is already present in the <BR>
26 * database. <BR>
27 * </BLOCKQUOTE>
28 * </P>
29 *
30 * <P>
31 * Uses cache: no
32 *
33 * State Management Type: Stateless
34 * </P>
35 *
36 * Configurable properties in flexdm.properties: <BR>
37 * <BLOCKQUOTE>
38 * <P>
39 * NONE <BR>
40 * </P>
41 * </BLOCKQUOTE>
42 *
43 */
44 public interface DisguiseRecordPersist
45 extends EjbObject
46 {
47 final static String IDENTIFIER="$Id: DisguiseRecordPersist.java,v 1.3 2003/08/11 02:22:33 aleric Exp $";
48
49 /**
50 * Insert or updates the asset and role information in its respective tables.
51 * It also insert bucket info (not update).
52 * Transaction Attribute: Required
53 *
54 * @param data Object containing all assets (and its bucket structure) to be inserted
55 * @return object updated with ids for assets and buckets inserted
56 *
57 * @exception EjbException if there is a problem with the EJB Server
58 * @exception RemoteException if there is a problem during the insert or update of assets
59 */
60 public DisguiseRecordData insertRecord( DisguiseRecordData data )
61 throws EjbException, java.rmi.RemoteException;
62
63 /**
64 * Parses through the entire data object checking for the existence of all buckets in the database.
65 * If a bucket (normal or element) exists, add the record id to the data object; otherwise set the
66 * record id value to zero.
67 * Transaction Attribute: Required
68 *
69 * @param data Object containing the buckets to be queried
70 * @return The updated DisguiseRecordData object with ids for existing buckets
71 *
72 * @exception EjbException if there is a problem with the EJB Server
73 * @exception RemoteException if there is a problem during the insert or update of assets
74 */
75 public DisguiseRecordData checkForExisting( DisguiseRecordData data )
76 throws EjbException, java.rmi.RemoteException;
77 }