forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIDatabinder.cs
75 lines (68 loc) · 2.47 KB
/
IDatabinder.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
using System.Collections;
using System.Xml;
namespace NHibernate
{
/// <summary>
/// Provides XML marshalling for classes registered with a <c>SessionFactory</c>
/// </summary>
/// <remarks>
/// <para>
/// Hibernate defines a generic XML format that may be used to represent any class
/// (<c>hibernate-generic.dtd</c>). The user configures an XSLT stylesheet for marshalling
/// data from this generic format to an application and/or user readable format. By default,
/// Hibernate will use <c>hibernate-default.xslt</c> which maps data to a useful human-
/// readable format.
/// </para>
/// <para>
/// The property <c>xml.output_stylesheet</c> specifies a user-written stylesheet.
/// Hibernate will attempt to load the stylesheet from the classpath first and if not found,
/// will attempt to load it as a file
/// </para>
/// <para>
/// It is not intended that implementors be threadsafe
/// </para>
/// </remarks>
public interface IDatabinder
{
/// <summary>
/// Add an object to the output document.
/// </summary>
/// <param name="obj">A transient or persistent instance</param>
/// <returns>Databinder</returns>
IDatabinder Bind(object obj);
/// <summary>
/// Add a collection of objects to the output document
/// </summary>
/// <param name="objs">A collection of transient or persistent instance</param>
/// <returns>Databinder</returns>
IDatabinder BindAll(ICollection objs);
/// <summary>
/// Output the generic XML representation of the bound objects
/// </summary>
/// <returns>Generic Xml representation</returns>
string ToGenericXml();
/// <summary>
/// Output the generic XML Representation of the bound objects
/// to a <c>XmlDocument</c>
/// </summary>
/// <returns>A generic Xml tree</returns>
XmlDocument ToGenericXmlDocument();
/// <summary>
/// Output the custom XML representation of the bound objects
/// </summary>
/// <returns>Custom Xml representation</returns>
string ToXML();
/// <summary>
/// Output the custom XML representation of the bound objects as
/// an <c>XmlDocument</c>
/// </summary>
/// <returns>A custom Xml Tree</returns>
XmlDocument ToXmlDocument();
/// <summary>
/// Controls whether bound objects (and their associated objects) that are lazily instantiated
/// are explicitly initialized or left as they are
/// </summary>
/// <value>True to explicitly initialize lazy objects, false to leave them in the state they are in</value>
bool InitializeLazy { get; set; }
}
}