01: /*
02: * Copyright 2006 Pentaho Corporation. All rights reserved.
03: * This software was developed by Pentaho Corporation and is provided under the terms
04: * of the Mozilla Public License, Version 1.1, or any later version. You may not use
05: * this file except in compliance with the license. If you need a copy of the license,
06: * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho
07: * BI Platform. The Initial Developer is Pentaho Corporation.
08: *
09: * Software distributed under the Mozilla Public License is distributed on an "AS IS"
10: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Please refer to
11: * the license for the specific language governing your rights and limitations.
12: *
13: * Created Nov 7, 2005
14: * @author mbatchel
15: */
16: package org.pentaho.repository;
17:
18: import java.util.*;
19:
20: import org.pentaho.repository.content.BackgroundExecutedContentId;
21: import org.pentaho.repository.content.ContentItem;
22: import org.pentaho.repository.content.ContentItemFile;
23: import org.pentaho.repository.content.ContentLocation;
24: import org.pentaho.repository.runtime.RuntimeElement;
25:
26: public class StdHibernateClassHandler implements
27: IHibernatedObjectExtensionList {
28:
29: public List getHibernatedObjectResourceList() {
30: List rtn = new ArrayList();
31: rtn
32: .add("org/pentaho/repository/runtime/RuntimeElement.hbm.xml"); //$NON-NLS-1$
33: rtn
34: .add("org/pentaho/repository/content/ContentLocation.hbm.xml");//$NON-NLS-1$
35: rtn.add("org/pentaho/repository/content/ContentItem.hbm.xml");//$NON-NLS-1$
36: rtn
37: .add("org/pentaho/repository/content/ContentItemFile.hbm.xml");//$NON-NLS-1$
38: rtn
39: .add("org/pentaho/repository/content/BackgroundExecutedContentId.hbm.xml");//$NON-NLS-1$
40: rtn
41: .add("org/pentaho/repository/DefinitionVersionManager.hbm.xml");//$NON-NLS-1$
42: return rtn;
43: }
44:
45: public Map getHibernatedObjectVersionMap() {
46: Map objVersions = new HashMap();
47: objVersions
48: .put(
49: "ContentItem", new Integer(ContentItem.ClassVersionNumber)); //$NON-NLS-1$
50: objVersions
51: .put(
52: "ContentItemFile", new Integer(ContentItemFile.ClassVersionNumber)); //$NON-NLS-1$
53: objVersions
54: .put(
55: "ContentLocation", new Integer(ContentLocation.ClassVersionNumber)); //$NON-NLS-1$
56: objVersions
57: .put(
58: "BackgroundExecutedContentId", new Integer(BackgroundExecutedContentId.ClassVersionNumber)); //$NON-NLS-1$
59: objVersions
60: .put(
61: "RuntimeElement", new Integer(RuntimeElement.ClassVersionNumber)); //$NON-NLS-1$
62: return objVersions;
63: }
64:
65: }
|