01: /*
02: * Copyright (c) Mateusz Prokopowicz. All Rights Reserved.
03: */
04:
05: package com.technoetic.xplanner;
06:
07: import java.util.Properties;
08:
09: import net.sf.hibernate.SessionFactory;
10:
11: /**
12: * User: mprokopowicz
13: * Date: Feb 6, 2006
14: * Time: 11:24:39 AM
15: */
16: public class DomainSpecificPropertiesFactory {
17: SessionFactory sessionFactory;
18: Properties defaultProperties;
19:
20: public DomainSpecificPropertiesFactory(
21: SessionFactory sessionFactory, Properties defaultProperties) {
22: this .sessionFactory = sessionFactory;
23: this .defaultProperties = defaultProperties;
24: }
25:
26: public Properties createPropertiesFor(Object domainObject) {
27: return new DomainSpecificProperties(defaultProperties,
28: sessionFactory, domainObject);
29: }
30:
31: public Properties getDefaultProperties() {
32: return defaultProperties;
33: }
34: }
|