diff --git a/nhibernateg7/.vs/nhibernateg7/v16/.suo b/nhibernateg7/.vs/nhibernateg7/v16/.suo new file mode 100644 index 0000000..379de31 Binary files /dev/null and b/nhibernateg7/.vs/nhibernateg7/v16/.suo differ diff --git a/nhibernateg7/.vs/nhibernateg7/v16/Server/sqlite3/db.lock b/nhibernateg7/.vs/nhibernateg7/v16/Server/sqlite3/db.lock new file mode 100644 index 0000000..e69de29 diff --git a/nhibernateg7/.vs/nhibernateg7/v16/Server/sqlite3/storage.ide b/nhibernateg7/.vs/nhibernateg7/v16/Server/sqlite3/storage.ide new file mode 100644 index 0000000..e5f3751 Binary files /dev/null and b/nhibernateg7/.vs/nhibernateg7/v16/Server/sqlite3/storage.ide differ diff --git a/nhibernateg7/nhibernateg7.sln b/nhibernateg7/nhibernateg7.sln new file mode 100644 index 0000000..d527533 --- /dev/null +++ b/nhibernateg7/nhibernateg7.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.28803.352 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nhibernateg7", "nhibernateg7\nhibernateg7.csproj", "{0E2C1D56-8D94-4424-BC66-3305C1258B38}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0E2C1D56-8D94-4424-BC66-3305C1258B38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0E2C1D56-8D94-4424-BC66-3305C1258B38}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0E2C1D56-8D94-4424-BC66-3305C1258B38}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0E2C1D56-8D94-4424-BC66-3305C1258B38}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {198325B1-DB9F-4E39-AE92-15D81E17D16D} + EndGlobalSection +EndGlobal diff --git a/nhibernateg7/nhibernateg7/App.config b/nhibernateg7/nhibernateg7/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/nhibernateg7/nhibernateg7/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/nhibernateg7/nhibernateg7/Car.cs b/nhibernateg7/nhibernateg7/Car.cs new file mode 100644 index 0000000..785e841 --- /dev/null +++ b/nhibernateg7/nhibernateg7/Car.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace nhibernateg7 +{ + public class Car + { + public virtual int ID { get; set; } + public virtual string Make { get; set; } + public virtual string Model { get; set; } + public virtual string Year { get; set; } + } +} diff --git a/nhibernateg7/nhibernateg7/CarMapping .cs b/nhibernateg7/nhibernateg7/CarMapping .cs new file mode 100644 index 0000000..f0cae16 --- /dev/null +++ b/nhibernateg7/nhibernateg7/CarMapping .cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using NHibernate.Mapping.ByCode; +using NHibernate.Mapping.ByCode.Conformist; +namespace nhibernateg7 +{ + public class CarMapping:ClassMapping + { + public CarMapping() + { + Id(s => s.ID, im => im.Generator(Generators.Identity)); + Property(s => s.Make, pm => pm.NotNullable(true)); + Property(s => s.Model, pm => pm.NotNullable(true)); + Property(s => s.Year, pm => pm.NotNullable(true)); + } + } +} diff --git a/nhibernateg7/nhibernateg7/Person.cs b/nhibernateg7/nhibernateg7/Person.cs new file mode 100644 index 0000000..88741e1 --- /dev/null +++ b/nhibernateg7/nhibernateg7/Person.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace nhibernateg7 +{ + public class Person + { + public virtual int ID { get; set; } + public virtual string LastName { get; set; } + public virtual string FirstName { get; set; } + public virtual Car Car { get; set; } + } +} diff --git a/nhibernateg7/nhibernateg7/PersonMapping.cs b/nhibernateg7/nhibernateg7/PersonMapping.cs new file mode 100644 index 0000000..e771867 --- /dev/null +++ b/nhibernateg7/nhibernateg7/PersonMapping.cs @@ -0,0 +1,21 @@ +using NHibernate.Mapping.ByCode; +using NHibernate.Mapping.ByCode.Conformist; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace nhibernateg7 +{ + public class PersonMapping: ClassMapping + { + public PersonMapping() + { + Id(s => s.ID, im => im.Generator(Generators.Identity)); // primary key mapping + Property(s => s.FirstName, pm => pm.NotNullable(true)); + Property(s => s.LastName, pm => pm.NotNullable(true)); + ManyToOne(s => s.Car, mom => mom.Cascade(Cascade.Persist)); + } + } +} diff --git a/nhibernateg7/nhibernateg7/ProgramNHibernate.cs b/nhibernateg7/nhibernateg7/ProgramNHibernate.cs new file mode 100644 index 0000000..ff0c1be --- /dev/null +++ b/nhibernateg7/nhibernateg7/ProgramNHibernate.cs @@ -0,0 +1,138 @@ +using System; +using System.Data; +using System.Linq; +using System.Reflection; + +using NHibernate.Cfg; +using NHibernate.Dialect; +using NHibernate.Driver; +using NHibernate.Mapping.ByCode; +using NHibernate.Tool.hbm2ddl; +//using NHibernateDemoApp.Domain; +//using NHibernateDemoApp.Mappings; + +using NHibernate.Linq; +using NHibernate.Criterion; +using NHibernate; + +namespace nhibernateg7 +{ + class ProgramNHibernate + { + static void Main(string[] args) + { + var configuration = new Configuration(); + + configuration.DataBaseIntegration(db => + { + db.ConnectionString = @"Server=.\sqlexpress;initial catalog=NHibernateTest;Integrated Security=true;"; + db.Dialect(); + db.Driver(); + }); + + var modelMapper = new ModelMapper(); + modelMapper.AddMapping(); + modelMapper.AddMapping(); + + var mapping = modelMapper.CompileMappingForAllExplicitlyAddedEntities(); + configuration.AddDeserializedMapping(mapping, "Test"); + + var schema = new SchemaExport(configuration); + + + // schema.Execute(false, true, false); + //ejecutar solo la primera vez + + //paso 1 + insertarDatos(configuration); + //paso 2 + //verDatos(configuration); + // paso 3 + // actualizarDatos(configuration) + // paso 4 + // deleteDatos(configuration); + + } + + public static void insertarDatos(Configuration cf) + { + var buildSessionFactory = cf.BuildSessionFactory(); + using (var session = buildSessionFactory.OpenSession()) + using (var tx = session.BeginTransaction()) + { + var person = new Person + { + FirstName = "raul", + LastName = "than", + Car = new Car { Make = "volvawen", Model = "megan", Year = "2013" } + }; + session.Save(person); + tx.Commit(); + + } + + + } + public static void verDatos(Configuration cf) + { + var buildSessionFactory = cf.BuildSessionFactory(); + using (var session = buildSessionFactory.OpenSession()) + using (var tx = session.BeginTransaction()) + { + var person = session.Query() + .Where(p => p.FirstName == "Linda") + .Select(p => p.LastName) + .First(); + + Console.WriteLine(person); + Console.ReadLine(); + tx.Commit(); + } + + } + + public static void actualizarDatos(Configuration cf) + { + var buildSessionFactory = cf.BuildSessionFactory(); + using (var session = buildSessionFactory.OpenSession()) + using (var tx = session.BeginTransaction()) + { + //IQuery query = session.CreateQuery("FROM Car WHERE ID = 1"); + //Car c = query.List()[0]; + //c.Year= "1988"; + //session.Update(c); + //Console.WriteLine(c.Year); + var person = session.QueryOver().Where(p => p.FirstName == "Linda").List(); + person.FirstOrDefault().Car.Year = "1968"; + session.Update(person.FirstOrDefault()); + Console.WriteLine(person.ToString()); + Console.ReadLine(); + tx.Commit(); + + } + } + + public static void deleteDatos(Configuration cf) + { + + { + var buildSessionFactory = cf.BuildSessionFactory(); + using (var session = buildSessionFactory.OpenSession()) + using (var tx = session.BeginTransaction()) + { + + var person = session.QueryOver().Where(p => p.FirstName == "raul").List(); + session.Delete(person.FirstOrDefault()); + tx.Commit(); + + } + + } + } + + } + + + +} + diff --git a/nhibernateg7/nhibernateg7/Properties/AssemblyInfo.cs b/nhibernateg7/nhibernateg7/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..b4408ed --- /dev/null +++ b/nhibernateg7/nhibernateg7/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// La información general de un ensamblado se controla mediante el siguiente +// conjunto de atributos. Cambie estos valores de atributo para modificar la información +// asociada con un ensamblado. +[assembly: AssemblyTitle("nhibernateg7")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("HP Inc.")] +[assembly: AssemblyProduct("nhibernateg7")] +[assembly: AssemblyCopyright("Copyright © HP Inc. 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Si establece ComVisible en false, los tipos de este ensamblado no estarán visibles +// para los componentes COM. Si es necesario obtener acceso a un tipo en este ensamblado desde +// COM, establezca el atributo ComVisible en true en este tipo. +[assembly: ComVisible(false)] + +//Para comenzar a compilar aplicaciones que se puedan traducir, establezca +//CultureYouAreCodingWith en el archivo .csproj +//dentro de . Por ejemplo, si utiliza inglés de EE.UU. +//en los archivos de código fuente, establezca en en-US. A continuación, quite la marca de comentario +//del atributo NeutralResourceLanguage. Actualice "en-US" en +//la siguiente línea para que coincida con el valor UICulture del archivo de proyecto. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //donde se encuentran los diccionarios de recursos específicos del tema + //(se utiliza si no se encuentra ningún recurso en la página, + // ni diccionarios de recursos de la aplicación) + ResourceDictionaryLocation.SourceAssembly //donde se encuentra el diccionario de recursos genérico + //(se utiliza si no se encuentra ningún recurso en la página, + // aplicación o diccionarios de recursos específicos del tema) +)] + + +// La información de versión de un ensamblado consta de los cuatro valores siguientes: +// +// Versión principal +// Versión secundaria +// Número de compilación +// Revisión +// +// Puede especificar todos los valores o usar los valores predeterminados de número de compilación y de revisión +// utilizando el carácter "*", como se muestra a continuación: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/nhibernateg7/nhibernateg7/Properties/Resources.Designer.cs b/nhibernateg7/nhibernateg7/Properties/Resources.Designer.cs new file mode 100644 index 0000000..b8222c6 --- /dev/null +++ b/nhibernateg7/nhibernateg7/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// Este código fue generado por una herramienta. +// Versión de runtime: 4.0.30319.42000 +// +// Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si +// el código se vuelve a generar. +// +//------------------------------------------------------------------------------ + +namespace nhibernateg7.Properties +{ + + + /// + /// Clase de recurso fuertemente tipado para buscar cadenas traducidas, etc. + /// + // StronglyTypedResourceBuilder generó automáticamente esta clase + // a través de una herramienta como ResGen o Visual Studio. + // Para agregar o quitar un miembro, edite el archivo .ResX y, a continuación, vuelva a ejecutar ResGen + // con la opción /str o recompile su proyecto de VS. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Devuelve la instancia ResourceManager almacenada en caché utilizada por esta clase. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("nhibernateg7.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Invalida la propiedad CurrentUICulture del subproceso actual para todas las + /// búsquedas de recursos usando esta clase de recursos fuertemente tipados. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/nhibernateg7/nhibernateg7/Properties/Resources.resx b/nhibernateg7/nhibernateg7/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/nhibernateg7/nhibernateg7/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/nhibernateg7/nhibernateg7/Properties/Settings.Designer.cs b/nhibernateg7/nhibernateg7/Properties/Settings.Designer.cs new file mode 100644 index 0000000..ac4f800 --- /dev/null +++ b/nhibernateg7/nhibernateg7/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace nhibernateg7.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/nhibernateg7/nhibernateg7/Properties/Settings.settings b/nhibernateg7/nhibernateg7/Properties/Settings.settings new file mode 100644 index 0000000..033d7a5 --- /dev/null +++ b/nhibernateg7/nhibernateg7/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/nhibernateg7/nhibernateg7/bin/Debug/Antlr3.Runtime.dll b/nhibernateg7/nhibernateg7/bin/Debug/Antlr3.Runtime.dll new file mode 100644 index 0000000..55c8fbd Binary files /dev/null and b/nhibernateg7/nhibernateg7/bin/Debug/Antlr3.Runtime.dll differ diff --git a/nhibernateg7/nhibernateg7/bin/Debug/Antlr3.Runtime.xml b/nhibernateg7/nhibernateg7/bin/Debug/Antlr3.Runtime.xml new file mode 100644 index 0000000..565e15d --- /dev/null +++ b/nhibernateg7/nhibernateg7/bin/Debug/Antlr3.Runtime.xml @@ -0,0 +1,3249 @@ + + + + Antlr3.Runtime + + + + + This is a char buffer stream that is loaded from a file + all at once when you construct the object. This looks very + much like an ANTLReader or ANTLRInputStream, but it's a special case + since we know the exact size of the object to load. We can avoid lots + of data copying. + + + + + A kind of ReaderStream that pulls from an InputStream. + Useful for reading from stdin and specifying file encodings etc... + + + + + Vacuum all input from a Reader and then treat it like a StringStream. + Manage the buffer manually to avoid unnecessary data copying. + + + + If you need encoding, use ANTLRInputStream. + + + + + A pretty quick CharStream that pulls all data from an array + directly. Every method call counts in the lexer. Java's + strings aren't very good so I'm avoiding. + + + + The data being scanned + + + How many characters are actually in the buffer + + + 0..n-1 index into string of next char + + + line number 1..n within the input + + + The index of the character relative to the beginning of the line 0..n-1 + + + tracks how deep mark() calls are nested + + + + A list of CharStreamState objects that tracks the stream state + values line, charPositionInLine, and p that can change as you + move through the input stream. Indexed from 1..markDepth. + A null is kept @ index 0. Create upon first call to mark(). + + + + Track the last mark() call result value for use in rewind(). + + + What is name or source of this char stream? + + + Copy data in string to a local char array + + + This is the preferred constructor as no data is copied + + + + Return the current input symbol index 0..n where n indicates the + last symbol has been read. The index is the index of char to + be returned from LA(1). + + + + + Reset the stream so that it's in the same state it was + when the object was created *except* the data array is not + touched. + + + + + consume() ahead until p==index; can't just set p=index as we must + update line and charPositionInLine. + + + + + A generic recognizer that can handle recognizers generated from + lexer, parser, and tree grammars. This is all the parsing + support code essentially; most of it is error recovery stuff and + backtracking. + + + + + State of a lexer, parser, or tree parser are collected into a state + object so the state can be shared. This sharing is needed to + have one grammar import others and share same error variables + and other state variables. It's a kind of explicit multiple + inheritance via delegation of methods and shared state. + + + + reset the parser's state; subclasses must rewinds the input stream + + + + Match current input symbol against ttype. Attempt + single token insertion or deletion error recovery. If + that fails, throw MismatchedTokenException. + + + + To turn off single token insertion or deletion error + recovery, override recoverFromMismatchedToken() and have it + throw an exception. See TreeParser.recoverFromMismatchedToken(). + This way any error in a rule will cause an exception and + immediate exit from rule. Rule would recover by resynchronizing + to the set of symbols that can follow rule ref. + + + + Match the wildcard: in a symbol + + + Report a recognition problem. + + + This method sets errorRecovery to indicate the parser is recovering + not parsing. Once in recovery mode, no errors are generated. + To get out of recovery mode, the parser must successfully match + a token (after a resync). So it will go: + + 1. error occurs + 2. enter recovery mode, report error + 3. consume until token found in resynch set + 4. try to resume parsing + 5. next match() will reset errorRecovery mode + + If you override, make sure to update syntaxErrors if you care about that. + + + + What error message should be generated for the various exception types? + + + Not very object-oriented code, but I like having all error message + generation within one method rather than spread among all of the + exception classes. This also makes it much easier for the exception + handling because the exception classes do not have to have pointers back + to this object to access utility routines and so on. Also, changing + the message for an exception type would be difficult because you + would have to subclassing exception, but then somehow get ANTLR + to make those kinds of exception objects instead of the default. + This looks weird, but trust me--it makes the most sense in terms + of flexibility. + + For grammar debugging, you will want to override this to add + more information such as the stack frame with + getRuleInvocationStack(e, this.getClass().getName()) and, + for no viable alts, the decision description and state etc... + + Override this to change the message generated for one or more + exception types. + + + + + Get number of recognition errors (lexer, parser, tree parser). Each + recognizer tracks its own number. So parser and lexer each have + separate count. Does not count the spurious errors found between + an error and next valid token match + + + + + + What is the error header, normally line/character position information? + + + + How should a token be displayed in an error message? The default + is to display just the text, but during development you might + want to have a lot of information spit out. Override in that case + to use t.ToString() (which, for CommonToken, dumps everything about + the token). This is better than forcing you to override a method in + your token objects because you don't have to go modify your lexer + so that it creates a new Java type. + + + + Override this method to change where error messages go + + + + Recover from an error found on the input stream. This is + for NoViableAlt and mismatched symbol exceptions. If you enable + single token insertion and deletion, this will usually not + handle mismatched symbol exceptions but there could be a mismatched + token that the match() routine could not recover from. + + + + + A hook to listen in on the token consumption during error recovery. + The DebugParser subclasses this to fire events to the listenter. + + + + + Compute the context-sensitive FOLLOW set for current rule. + This is set of token types that can follow a specific rule + reference given a specific call chain. You get the set of + viable tokens that can possibly come next (lookahead depth 1) + given the current call chain. Contrast this with the + definition of plain FOLLOW for rule r: + + + FOLLOW(r)={x | S=>*alpha r beta in G and x in FIRST(beta)} + + where x in T* and alpha, beta in V*; T is set of terminals and + V is the set of terminals and nonterminals. In other words, + FOLLOW(r) is the set of all tokens that can possibly follow + references to r in *any* sentential form (context). At + runtime, however, we know precisely which context applies as + we have the call chain. We may compute the exact (rather + than covering superset) set of following tokens. + + For example, consider grammar: + + stat : ID '=' expr ';' // FOLLOW(stat)=={EOF} + | "return" expr '.' + ; + expr : atom ('+' atom)* ; // FOLLOW(expr)=={';','.',')'} + atom : INT // FOLLOW(atom)=={'+',')',';','.'} + | '(' expr ')' + ; + + The FOLLOW sets are all inclusive whereas context-sensitive + FOLLOW sets are precisely what could follow a rule reference. + For input input "i=(3);", here is the derivation: + + stat => ID '=' expr ';' + => ID '=' atom ('+' atom)* ';' + => ID '=' '(' expr ')' ('+' atom)* ';' + => ID '=' '(' atom ')' ('+' atom)* ';' + => ID '=' '(' INT ')' ('+' atom)* ';' + => ID '=' '(' INT ')' ';' + + At the "3" token, you'd have a call chain of + + stat -> expr -> atom -> expr -> atom + + What can follow that specific nested ref to atom? Exactly ')' + as you can see by looking at the derivation of this specific + input. Contrast this with the FOLLOW(atom)={'+',')',';','.'}. + + You want the exact viable token set when recovering from a + token mismatch. Upon token mismatch, if LA(1) is member of + the viable next token set, then you know there is most likely + a missing token in the input stream. "Insert" one by just not + throwing an exception. + + + Attempt to recover from a single missing or extra token. + + EXTRA TOKEN + + LA(1) is not what we are looking for. If LA(2) has the right token, + however, then assume LA(1) is some extra spurious token. Delete it + and LA(2) as if we were doing a normal match(), which advances the + input. + + MISSING TOKEN + + If current token is consistent with what could come after + ttype then it is ok to "insert" the missing token, else throw + exception For example, Input "i=(3;" is clearly missing the + ')'. When the parser returns from the nested call to expr, it + will have call chain: + + stat -> expr -> atom + + and it will be trying to match the ')' at this point in the + derivation: + + => ID '=' '(' INT ')' ('+' atom)* ';' + ^ + match() will see that ';' doesn't match ')' and report a + mismatched token error. To recover, it sees that LA(1)==';' + is in the set of tokens that can follow the ')' token + reference in rule atom. It can assume that you forgot the ')'. + + + Not currently used + + + + Match needs to return the current input symbol, which gets put + into the label for the associated token ref; e.g., x=ID. Token + and tree parsers need to return different objects. Rather than test + for input stream type or change the IntStream interface, I use + a simple method to ask the recognizer to tell me what the current + input symbol is. + + + This is ignored for lexers. + + + Conjure up a missing token during error recovery. + + + The recognizer attempts to recover from single missing + symbols. But, actions might refer to that missing symbol. + For example, x=ID {f($x);}. The action clearly assumes + that there has been an identifier matched previously and that + $x points at that token. If that token is missing, but + the next token in the stream is what we want we assume that + this token is missing and we keep going. Because we + have to return some token to replace the missing token, + we have to conjure one up. This method gives the user control + over the tokens returned for missing tokens. Mostly, + you will want to create something special for identifier + tokens. For literals such as '{' and ',', the default + action in the parser or tree parser works. It simply creates + a CommonToken of the appropriate type. The text will be the token. + If you change what tokens must be created by the lexer, + override this method to create the appropriate tokens. + + + + Consume tokens until one matches the given token set + + + Push a rule's follow set using our own hardcoded stack + + + + Return of the rules in your parser instance + leading up to a call to this method. You could override if + you want more details such as the file/line info of where + in the parser java code a rule is invoked. + + + + This is very useful for error messages and for context-sensitive + error recovery. + + + + + A more general version of GetRuleInvocationStack where you can + pass in the StackTrace of, for example, a RecognitionException + to get it's rule stack trace. + + + + Return whether or not a backtracking attempt failed. + + + + Used to print out token names like ID during debugging and + error reporting. The generated parsers implement a method + that overrides this to point to their String[] tokenNames. + + + + + For debugging and other purposes, might want the grammar name. + Have ANTLR generate an implementation for this method. + + + + + A convenience method for use most often with template rewrites. + Convert a list of to a list of . + + + + + Given a rule number and a start token index number, return + MEMO_RULE_UNKNOWN if the rule has not parsed input starting from + start index. If this rule has parsed input starting from the + start index before, then return where the rule stopped parsing. + It returns the index of the last token matched by the rule. + + + + For now we use a hashtable and just the slow Object-based one. + Later, we can make a special one for ints and also one that + tosses out data after we commit past input position i. + + + + + Has this rule already parsed input at the current index in the + input stream? Return the stop token index or MEMO_RULE_UNKNOWN. + If we attempted but failed to parse properly before, return + MEMO_RULE_FAILED. + + + + This method has a side-effect: if we have seen this input for + this rule and successfully parsed before, then seek ahead to + 1 past the stop token matched for this rule last time. + + + + + Record whether or not this rule parsed the input at this position + successfully. Use a standard java hashtable for now. + + + + return how many rule/input-index pairs there are in total. + TODO: this includes synpreds. :( + + + + A stripped-down version of org.antlr.misc.BitSet that is just + good enough to handle runtime requirements such as FOLLOW sets + for automatic error recovery. + + + + + We will often need to do a mod operator (i mod nbits). Its + turns out that, for powers of two, this mod operation is + same as (i & (nbits-1)). Since mod is slow, we use a + precomputed mod mask to do the mod instead. + + + + The actual data bits + + + Construct a bitset of size one word (64 bits) + + + Construction from a static array of longs + + + Construction from a list of integers + + + Construct a bitset given the size + The size of the bitset in bits + + + return this | a in a new set + + + or this element into this set (grow as necessary to accommodate) + + + Grows the set to a larger number of bits. + element that must fit in set + + + Sets the size of a set. + how many words the new set should be + + + return how much space is being used by the bits array not how many actually have member bits on. + + + Is this contained within a? + + + Buffer all input tokens but do on-demand fetching of new tokens from + lexer. Useful when the parser or lexer has to set context/mode info before + proper lexing of future tokens. The ST template parser needs this, + for example, because it has to constantly flip back and forth between + inside/output templates. E.g., <names:{hi, <it>}> has to parse names + as part of an expression but "hi, <it>" as a nested template. + + You can't use this stream if you pass whitespace or other off-channel + tokens to the parser. The stream can't ignore off-channel tokens. + (UnbufferedTokenStream is the same way.) + + This is not a subclass of UnbufferedTokenStream because I don't want + to confuse small moving window of tokens it uses for the full buffer. + + + Record every single token pulled from the source so we can reproduce + chunks of it later. The buffer in LookaheadStream overlaps sometimes + as its moving window moves through the input. This list captures + everything so we can access complete input text. + + + Track the last mark() call result value for use in rewind(). + + + The index into the tokens list of the current token (next token + to consume). tokens[p] should be LT(1). p=-1 indicates need + to initialize with first token. The ctor doesn't get a token. + First call to LT(1) or whatever gets the first token and sets p=0; + + + + How deep have we gone? + + + + Move the input pointer to the next incoming token. The stream + must become active with LT(1) available. consume() simply + moves the input pointer so that LT(1) points at the next + input symbol. Consume at least one token. + + Walk past any token not on the channel the parser is listening to. + + + Make sure index i in tokens has a token. + + + add n elements to buffer + + + Given a start and stop index, return a List of all tokens in + the token type BitSet. Return null if no tokens were found. This + method looks at both on and off channel tokens. + + + + When walking ahead with cyclic DFA or for syntactic predicates, + we need to record the state of the input stream (char index, + line, etc...) so that we can rewind the state after scanning ahead. + + + This is the complete state of a stream. + + + Index into the char stream of next lookahead char + + + What line number is the scanner at before processing buffer[p]? + + + What char position 0..n-1 in line is scanner before processing buffer[p]? + + + + A Token object like we'd use in ANTLR 2.x; has an actual string created + and associated with this object. These objects are needed for imaginary + tree nodes that have payload objects. We need to create a Token object + that has a string; the tree node will point at this token. CommonToken + has indexes into a char stream and hence cannot be used to introduce + new strings. + + + + What token number is this from 0..n-1 tokens + + + + We need to be able to change the text once in a while. If + this is non-null, then getText should return this. Note that + start/stop are not affected by changing this. + + + + What token number is this from 0..n-1 tokens; < 0 implies invalid index + + + The char position into the input buffer where this token starts + + + The char position into the input buffer where this token stops + + + + The most common stream of tokens is one where every token is buffered up + and tokens are prefiltered for a certain channel (the parser will only + see these tokens and cannot change the filter channel number during the + parse). + + + TODO: how to access the full token stream? How to track all tokens matched per rule? + + + Skip tokens on any channel but this one; this is how we skip whitespace... + + + Reset this token stream by setting its token source. + + + Always leave p on an on-channel token. + + + Given a starting index, return the index of the first on-channel + token. + + + All debugging events that a recognizer can trigger. + + + I did not create a separate AST debugging interface as it would create + lots of extra classes and DebugParser has a dbg var defined, which makes + it hard to change to ASTDebugEventListener. I looked hard at this issue + and it is easier to understand as one monolithic event interface for all + possible events. Hopefully, adding ST debugging stuff won't be bad. Leave + for future. 4/26/2006. + + + + + The parser has just entered a rule. No decision has been made about + which alt is predicted. This is fired AFTER init actions have been + executed. Attributes are defined and available etc... + The grammarFileName allows composite grammars to jump around among + multiple grammar files. + + + + + Because rules can have lots of alternatives, it is very useful to + know which alt you are entering. This is 1..n for n alts. + + + + + This is the last thing executed before leaving a rule. It is + executed even if an exception is thrown. This is triggered after + error reporting and recovery have occurred (unless the exception is + not caught in this rule). This implies an "exitAlt" event. + The grammarFileName allows composite grammars to jump around among + multiple grammar files. + + + + Track entry into any (...) subrule other EBNF construct + + + + Every decision, fixed k or arbitrary, has an enter/exit event + so that a GUI can easily track what LT/consume events are + associated with prediction. You will see a single enter/exit + subrule but multiple enter/exit decision events, one for each + loop iteration. + + + + + An input token was consumed; matched by any kind of element. + Trigger after the token was matched by things like match(), matchAny(). + + + + + An off-channel input token was consumed. + Trigger after the token was matched by things like match(), matchAny(). + (unless of course the hidden token is first stuff in the input stream). + + + + + Somebody (anybody) looked ahead. Note that this actually gets + triggered by both LA and LT calls. The debugger will want to know + which Token object was examined. Like consumeToken, this indicates + what token was seen at that depth. A remote debugger cannot look + ahead into a file it doesn't have so LT events must pass the token + even if the info is redundant. + + + + + The parser is going to look arbitrarily ahead; mark this location, + the token stream's marker is sent in case you need it. + + + + + After an arbitrairly long lookahead as with a cyclic DFA (or with + any backtrack), this informs the debugger that stream should be + rewound to the position associated with marker. + + + + + Rewind to the input position of the last marker. + Used currently only after a cyclic DFA and just + before starting a sem/syn predicate to get the + input position back to the start of the decision. + Do not "pop" the marker off the state. mark(i) + and rewind(i) should balance still. + + + + + To watch a parser move through the grammar, the parser needs to + inform the debugger what line/charPos it is passing in the grammar. + For now, this does not know how to switch from one grammar to the + other and back for island grammars etc... + + + + This should also allow breakpoints because the debugger can stop + the parser whenever it hits this line/pos. + + + + + A recognition exception occurred such as NoViableAltException. I made + this a generic event so that I can alter the exception hierachy later + without having to alter all the debug objects. + + + + Upon error, the stack of enter rule/subrule must be properly unwound. + If no viable alt occurs it is within an enter/exit decision, which + also must be rewound. Even the rewind for each mark must be unwount. + In the Java target this is pretty easy using try/finally, if a bit + ugly in the generated code. The rewind is generated in DFA.predict() + actually so no code needs to be generated for that. For languages + w/o this "finally" feature (C++?), the target implementor will have + to build an event stack or something. + + Across a socket for remote debugging, only the RecognitionException + data fields are transmitted. The token object or whatever that + caused the problem was the last object referenced by LT. The + immediately preceding LT event should hold the unexpected Token or + char. + + Here is a sample event trace for grammar: + + b : C ({;}A|B) // {;} is there to prevent A|B becoming a set + | D + ; + + The sequence for this rule (with no viable alt in the subrule) for + input 'c c' (there are 3 tokens) is: + + commence + LT(1) + enterRule b + location 7 1 + enter decision 3 + LT(1) + exit decision 3 + enterAlt1 + location 7 5 + LT(1) + consumeToken [c/<4>,1:0] + location 7 7 + enterSubRule 2 + enter decision 2 + LT(1) + LT(1) + recognitionException NoViableAltException 2 1 2 + exit decision 2 + exitSubRule 2 + beginResync + LT(1) + consumeToken [c/<4>,1:1] + LT(1) + endResync + LT(-1) + exitRule b + terminate + + + + + Indicates the recognizer is about to consume tokens to resynchronize + the parser. Any consume events from here until the recovered event + are not part of the parse--they are dead tokens. + + + + + Indicates that the recognizer has finished consuming tokens in order + to resychronize. There may be multiple beginResync/endResync pairs + before the recognizer comes out of errorRecovery mode (in which + multiple errors are suppressed). This will be useful + in a gui where you want to probably grey out tokens that are consumed + but not matched to anything in grammar. Anything between + a beginResync/endResync pair was tossed out by the parser. + + + + A semantic predicate was evaluate with this result and action text + + + + Announce that parsing has begun. Not technically useful except for + sending events over a socket. A GUI for example will launch a thread + to connect and communicate with a remote parser. The thread will want + to notify the GUI when a connection is made. ANTLR parsers + trigger this upon entry to the first rule (the ruleLevel is used to + figure this out). + + + + + Parsing is over; successfully or not. Mostly useful for telling + remote debugging listeners that it's time to quit. When the rule + invocation level goes to zero at the end of a rule, we are done + parsing. + + + + + Input for a tree parser is an AST, but we know nothing for sure + about a node except its type and text (obtained from the adaptor). + This is the analog of the consumeToken method. Again, the ID is + the hashCode usually of the node so it only works if hashCode is + not implemented. If the type is UP or DOWN, then + the ID is not really meaningful as it's fixed--there is + just one UP node and one DOWN navigation node. + + + + + + + The tree parser lookedahead. If the type is UP or DOWN, + then the ID is not really meaningful as it's fixed--there is + just one UP node and one DOWN navigation node. + + + + + A nil was created (even nil nodes have a unique ID... + they are not "null" per se). As of 4/28/2006, this + seems to be uniquely triggered when starting a new subtree + such as when entering a subrule in automatic mode and when + building a tree in rewrite mode. + + + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only t.ID is set. + + + + + Upon syntax error, recognizers bracket the error with an error node + if they are building ASTs. + + + + + + Announce a new node built from token elements such as type etc... + + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only t.ID, type, text are + set. + + + + Announce a new node built from an existing token. + + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only node.ID and token.tokenIndex + are set. + + + + Make a node the new root of an existing root. See + + + Note: the newRootID parameter is possibly different + than the TreeAdaptor.becomeRoot() newRoot parameter. + In our case, it will always be the result of calling + TreeAdaptor.becomeRoot() and not root_n or whatever. + + The listener should assume that this event occurs + only when the current subrule (or rule) subtree is + being reset to newRootID. + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only IDs are set. + + + + + + Make childID a child of rootID. + + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only IDs are set. + + + + + + Set the token start/stop token index for a subtree root or node. + + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only t.ID is set. + + + + A DFA implemented as a set of transition tables. + + + Any state that has a semantic predicate edge is special; those states + are generated with if-then-else structures in a specialStateTransition() + which is generated by cyclicDFA template. + + There are at most 32767 states (16-bit signed short). + Could get away with byte sometimes but would have to generate different + types and the simulation code too. For a point of reference, the Java + lexer's Tokens rule DFA has 326 states roughly. + + + + Which recognizer encloses this DFA? Needed to check backtracking + + + + From the input stream, predict what alternative will succeed + using this DFA (representing the covering regular approximation + to the underlying CFL). Return an alternative number 1..n. Throw + an exception upon error. + + + + A hook for debugging interface + + + + Given a String that has a run-length-encoding of some unsigned shorts + like "\1\2\3\9", convert to short[] {2,9,9,9}. We do this to avoid + static short[] which generates so much init code that the class won't + compile. :( + + + + Hideous duplication of code, but I need different typed arrays out :( + + + The recognizer did not match anything for a (..)+ loop. + + + + A semantic predicate failed during validation. Validation of predicates + occurs when normally parsing the alternative just like matching a token. + Disambiguating predicate evaluation occurs when we hoist a predicate into + a prediction decision. + + + + AST rules have trees + + + Has a value potentially if output=AST; + + + AST rules have trees + + + Has a value potentially if output=AST; + + + A source of characters for an ANTLR lexer + + + + For infinite streams, you don't need this; primarily I'm providing + a useful interface for action code. Just make sure actions don't + use this on streams that don't support it. + + + + + Get the ith character of lookahead. This is the same usually as + LA(i). This will be used for labels in the generated + lexer code. I'd prefer to return a char here type-wise, but it's + probably better to be 32-bit clean and be consistent with LA. + + + + ANTLR tracks the line information automatically + Because this stream can rewind, we need to be able to reset the line + + + The index of the character relative to the beginning of the line 0..n-1 + + + + A simple stream of integers used when all I care about is the char + or token type sequence (such as interpretation). + + + + + Get int at current input pointer + i ahead where i=1 is next int. + Negative indexes are allowed. LA(-1) is previous token (token + just matched). LA(-i) where i is before first token should + yield -1, invalid char / EOF. + + + + + Tell the stream to start buffering if it hasn't already. Return + current input position, Index, or some other marker so that + when passed to rewind() you get back to the same spot. + rewind(mark()) should not affect the input cursor. The Lexer + track line/col info as well as input index so its markers are + not pure input indexes. Same for tree node streams. + + + + + Return the current input symbol index 0..n where n indicates the + last symbol has been read. The index is the symbol about to be + read not the most recently read symbol. + + + + + Reset the stream so that next call to index would return marker. + The marker will usually be Index but it doesn't have to be. It's + just a marker to indicate what state the stream was in. This is + essentially calling release() and seek(). If there are markers + created after this marker argument, this routine must unroll them + like a stack. Assume the state the stream was in when this marker + was created. + + + + + Rewind to the input position of the last marker. + Used currently only after a cyclic DFA and just + before starting a sem/syn predicate to get the + input position back to the start of the decision. + Do not "pop" the marker off the state. mark(i) + and rewind(i) should balance still. It is + like invoking rewind(last marker) but it should not "pop" + the marker off. It's like seek(last marker's input position). + + + + + You may want to commit to a backtrack but don't want to force the + stream to keep bookkeeping objects around for a marker that is + no longer necessary. This will have the same behavior as + rewind() except it releases resources without the backward seek. + This must throw away resources for all markers back to the marker + argument. So if you're nested 5 levels of mark(), and then release(2) + you have to release resources for depths 2..5. + + + + + Set the input cursor to the position indicated by index. This is + normally used to seek ahead in the input stream. No buffering is + required to do this unless you know your stream will use seek to + move backwards such as when backtracking. + + + + This is different from rewind in its multi-directional + requirement and in that its argument is strictly an input cursor (index). + + For char streams, seeking forward must update the stream state such + as line number. For seeking backwards, you will be presumably + backtracking using the mark/rewind mechanism that restores state and + so this method does not need to update state when seeking backwards. + + Currently, this method is only used for efficient backtracking using + memoization, but in the future it may be used for incremental parsing. + + The index is 0..n-1. A seek to position i means that LA(1) will + return the ith symbol. So, seeking to 0 means LA(1) will return the + first element in the stream. + + + + + Only makes sense for streams that buffer everything up probably, but + might be useful to display the entire stream or for testing. This + value includes a single EOF. + + + + + Where are you getting symbols from? Normally, implementations will + pass the buck all the way to the lexer who can ask its input stream + for the file name or whatever. + + + + + Rules can have start/stop info. + + + + + Gets the start element from the input stream + + + + + Gets the stop element from the input stream + + + + + Rules can have start/stop info. + + The element type of the input stream. + + + + Gets the start element from the input stream + + + + + Gets the stop element from the input stream + + + + Get the text of the token + + + The line number on which this token was matched; line=1..n + + + The index of the first character relative to the beginning of the line 0..n-1 + + + + An index from 0..n-1 of the token object in the input stream. + This must be valid in order to use the ANTLRWorks debugger. + + + + + From what character stream was this token created? You don't have to + implement but it's nice to know where a Token comes from if you have + include files etc... on the input. + + + + + A source of tokens must provide a sequence of tokens via nextToken() + and also must reveal it's source of characters; CommonToken's text is + computed from a CharStream; it only store indices into the char stream. + + + + Errors from the lexer are never passed to the parser. Either you want + to keep going or you do not upon token recognition error. If you do not + want to continue lexing then you do not want to continue parsing. Just + throw an exception not under RecognitionException and Java will naturally + toss you all the way out of the recognizers. If you want to continue + lexing then you should not throw an exception to the parser--it has already + requested a token. Keep lexing until you get a valid one. Just report + errors and keep going, looking for a valid token. + + + + + Return a Token object from your input stream (usually a CharStream). + Do not fail/return upon lexing error; keep chewing on the characters + until you get a good one; errors are not passed through to the parser. + + + + + Where are you getting tokens from? normally the implication will simply + ask lexers input stream. + + + + A stream of tokens accessing tokens from a TokenSource + + + Get Token at current input pointer + i ahead where i=1 is next Token. + i<0 indicates tokens in the past. So -1 is previous token and -2 is + two tokens ago. LT(0) is undefined. For i>=n, return Token.EOFToken. + Return null for LT(0) and any index that results in an absolute address + that is negative. + + + + How far ahead has the stream been asked to look? The return + value is a valid index from 0..n-1. + + + + + Get a token at an absolute index i; 0..n-1. This is really only + needed for profiling and debugging and token stream rewriting. + If you don't want to buffer up tokens, then this method makes no + sense for you. Naturally you can't use the rewrite stream feature. + I believe DebugTokenStream can easily be altered to not use + this method, removing the dependency. + + + + + Where is this stream pulling tokens from? This is not the name, but + the object that provides Token objects. + + + + + Return the text of all tokens from start to stop, inclusive. + If the stream does not buffer all the tokens then it can just + return "" or null; Users should not access $ruleLabel.text in + an action of course in that case. + + + + + Because the user is not required to use a token with an index stored + in it, we must provide a means for two token objects themselves to + indicate the start/end location. Most often this will just delegate + to the other toString(int,int). This is also parallel with + the TreeNodeStream.toString(Object,Object). + + + + + The most common stream of tokens is one where every token is buffered up + and tokens are prefiltered for a certain channel (the parser will only + see these tokens and cannot change the filter channel number during the + parse). + + + TODO: how to access the full token stream? How to track all tokens matched per rule? + + + + Record every single token pulled from the source so we can reproduce + chunks of it later. + + + + Map from token type to channel to override some Tokens' channel numbers + + + Set of token types; discard any tokens with this type + + + Skip tokens on any channel but this one; this is how we skip whitespace... + + + By default, track all incoming tokens + + + Track the last mark() call result value for use in rewind(). + + + + The index into the tokens list of the current token (next token + to consume). p==-1 indicates that the tokens list is empty + + + + + How deep have we gone? + + + + Reset this token stream by setting its token source. + + + + Load all tokens from the token source and put in tokens. + This is done upon first LT request because you might want to + set some token type / channel overrides before filling buffer. + + + + + Move the input pointer to the next incoming token. The stream + must become active with LT(1) available. consume() simply + moves the input pointer so that LT(1) points at the next + input symbol. Consume at least one token. + + + + Walk past any token not on the channel the parser is listening to. + + + + Given a starting index, return the index of the first on-channel token. + + + + A simple filter mechanism whereby you can tell this token stream + to force all tokens of type ttype to be on channel. For example, + when interpreting, we cannot exec actions so we need to tell + the stream to force all WS and NEWLINE to be a different, ignored + channel. + + + + + Given a start and stop index, return a List of all tokens in + the token type BitSet. Return null if no tokens were found. This + method looks at both on and off channel tokens. + + + + + Get the ith token from the current position 1..n where k=1 is the + first symbol of lookahead. + + + + Look backwards k tokens on-channel tokens + + + + Return absolute token i; ignore which channel the tokens are on; + that is, count all tokens not just on-channel tokens. + + + + + A lexer is recognizer that draws input symbols from a character stream. + lexer grammars result in a subclass of this object. A Lexer object + uses simplified match() and error recovery mechanisms in the interest + of speed. + + + + Where is the lexer drawing characters from? + + + + Gets or sets the text matched so far for the current token or any text override. + + + Setting this value replaces any previously set value, and overrides the original text. + + + + Return a token from this source; i.e., match a token on the char stream. + + + Returns the EOF token (default), if you need + to return a custom token instead override this method. + + + + Instruct the lexer to skip creating a token for current lexer rule + and look for another token. nextToken() knows to keep looking when + a lexer rule finishes with token set to SKIP_TOKEN. Recall that + if token==null at end of any token rule, it creates one for you + and emits it. + + + + This is the lexer entry point that sets instance var 'token' + + + + Currently does not support multiple emits per nextToken invocation + for efficiency reasons. Subclass and override this method and + nextToken (to push tokens into a list and pull from that list rather + than a single variable as this implementation does). + + + + + The standard method called to automatically emit a token at the + outermost lexical rule. The token object should point into the + char buffer start..stop. If there is a text override in 'text', + use that to set the token's text. Override this method to emit + custom Token objects. + + + + If you are building trees, then you should also override + Parser or TreeParser.getMissingSymbol(). + + + + What is the index of the current character of lookahead? + + + + Lexers can normally match any char in it's vocabulary after matching + a token, so do the easy thing and just kill a character and hope + it all works out. You can instead use the rule invocation stack + to do sophisticated error recovery if you are in a fragment rule. + + + + A queue that can dequeue and get(i) in O(1) and grow arbitrarily large. + A linked list is fast at dequeue but slow at get(i). An array is + the reverse. This is O(1) for both operations. + + List grows until you dequeue last element at end of buffer. Then + it resets to start filling at 0 again. If adds/removes are balanced, the + buffer will not grow too large. + + No iterator stuff as that's not how we'll use it. + + + dynamically-sized buffer of elements + + + index of next element to fill + + + + How deep have we gone? + + + + + Return element {@code i} elements ahead of current element. {@code i==0} + gets current element. This is not an absolute index into {@link #data} + since {@code p} defines the start of the real list. + + + + Get and remove first element in queue + + + Return string of current buffer contents; non-destructive + + + + A lookahead queue that knows how to mark/release locations in the buffer for + backtracking purposes. Any markers force the {@link FastQueue} superclass to + keep all elements until no more markers; then can reset to avoid growing a + huge buffer. + + + + Absolute token index. It's the index of the symbol about to be + read via {@code LT(1)}. Goes from 0 to numtokens. + + + This is the {@code LT(-1)} element for the first element in {@link #data}. + + + Track object returned by nextElement upon end of stream; + Return it later when they ask for LT passed end of input. + + + Track the last mark() call result value for use in rewind(). + + + tracks how deep mark() calls are nested + + + + Implement nextElement to supply a stream of elements to this + lookahead buffer. Return EOF upon end of the stream we're pulling from. + + + + + Get and remove first element in queue; override + {@link FastQueue#remove()}; it's the same, just checks for backtracking. + + + + Make sure we have at least one element to remove, even if EOF + + + + Make sure we have 'need' elements from current position p. Last valid + p index is data.size()-1. p+need-1 is the data index 'need' elements + ahead. If we need 1 element, (p+1-1)==p must be < data.size(). + + + + add n elements to buffer + + + Size of entire stream is unknown; we only know buffer size from FastQueue + + + + Seek to a 0-indexed absolute token index. Normally used to seek backwards + in the buffer. Does not force loading of nodes. + + + To preserve backward compatibility, this method allows seeking past the + end of the currently buffered data. In this case, the input pointer will + be moved but the data will only actually be loaded upon the next call to + {@link #consume} or {@link #LT} for {@code k>0}. + + + + A mismatched char or Token or tree node + + + + We were expecting a token but it's not found. The current token + is actually what we wanted next. Used for tree node errors too. + + + + + A parser for TokenStreams. "parser grammars" result in a subclass + of this. + + + + Gets or sets the token stream; resets the parser upon a set. + + + + Rules that return more than a single value must return an object + containing all the values. Besides the properties defined in + RuleLabelScope.predefinedRulePropertiesScope there may be user-defined + return values. This class simply defines the minimum properties that + are always defined and methods to access the others that might be + available depending on output option such as template and tree. + + + + Note text is not an actual property of the return value, it is computed + from start and stop using the input stream's toString() method. I + could add a ctor to this so that we can pass in and store the input + stream, but I'm not sure we want to do that. It would seem to be undefined + to get the .text property anyway if the rule matches tokens from multiple + input streams. + + I do not use getters for fields of objects that are used simply to + group values such as this aggregate. The getters/setters are there to + satisfy the superclass interface. + + + + The root of the ANTLR exception hierarchy. + + + To avoid English-only error messages and to generally make things + as flexible as possible, these exceptions are not created with strings, + but rather the information necessary to generate an error. Then + the various reporting methods in Parser and Lexer can be overridden + to generate a localized error message. For example, MismatchedToken + exceptions are built with the expected token type. + So, don't expect getMessage() to return anything. + + Note that as of Java 1.4, you can access the stack trace, which means + that you can compute the complete trace of rules from the start symbol. + This gives you considerable context information with which to generate + useful error messages. + + ANTLR generates code that throws exceptions upon recognition error and + also generates code to catch these exceptions in each rule. If you + want to quit upon first error, you can turn off the automatic error + handling mechanism using rulecatch action, but you still need to + override methods mismatch and recoverFromMismatchSet. + + In general, the recognition exceptions can track where in a grammar a + problem occurred and/or what was the expected input. While the parser + knows its state (such as current input symbol and line info) that + state can change before the exception is reported so current token index + is computed and stored at exception time. From this info, you can + perhaps print an entire line of input not just a single token, for example. + Better to just say the recognizer had a problem and then let the parser + figure out a fancy report. + + + + What input stream did the error occur in? + + + + What was the lookahead index when this exception was thrown? + + + + What is index of token/char were we looking at when the error occurred? + + + + The current Token when an error occurred. Since not all streams + can retrieve the ith Token, we have to track the Token object. + For parsers. Even when it's a tree parser, token might be set. + + + + + If this is a tree parser exception, node is set to the node with + the problem. + + + + The current char when an error occurred. For lexers. + + + + Track the line (1-based) at which the error occurred in case this is + generated from a lexer. We need to track this since the + unexpected char doesn't carry the line info. + + + + + The 0-based index into the line where the error occurred. + + + + + If you are parsing a tree node stream, you will encounter som + imaginary nodes w/o line/col info. We now search backwards looking + for most recent token with line/col info, but notify getErrorHeader() + that info is approximate. + + + + Used for remote debugger deserialization + + + Return the token type or char of the unexpected input element + + + + The set of fields needed by an abstract recognizer to recognize input + and recover from errors etc... As a separate state object, it can be + shared among multiple grammars; e.g., when one grammar imports another. + + + + These fields are publically visible but the actual state pointer per + parser is protected. + + + + + Track the set of token types that can follow any rule invocation. + Stack grows upwards. When it hits the max, it grows 2x in size + and keeps going. + + + + + This is true when we see an error and before having successfully + matched a token. Prevents generation of more than one error message + per error. + + + + + The index into the input stream where the last error occurred. + This is used to prevent infinite loops where an error is found + but no token is consumed during recovery...another error is found, + ad naseum. This is a failsafe mechanism to guarantee that at least + one token/tree node is consumed for two errors. + + + + + In lieu of a return value, this indicates that a rule or token + has failed to match. Reset to false upon valid token match. + + + + Did the recognizer encounter a syntax error? Track how many. + + + + If 0, no backtracking is going on. Safe to exec actions etc... + If >0 then it's the level of backtracking. + + + + + An array[size num rules] of dictionaries that tracks + the stop token index for each rule. ruleMemo[ruleIndex] is + the memoization table for ruleIndex. For key ruleStartIndex, you + get back the stop token for associated rule or MEMO_RULE_FAILED. + + + This is only used if rule memoization is on (which it is by default). + + + + The goal of all lexer rules/methods is to create a token object. + This is an instance variable as multiple rules may collaborate to + create a single token. nextToken will return this object after + matching lexer rule(s). If you subclass to allow multiple token + emissions, then set this to the last token to be matched or + something nonnull so that the auto token emit mechanism will not + emit another token. + + + + + What character index in the stream did the current token start at? + Needed, for example, to get the text for current token. Set at + the start of nextToken. + + + + The line on which the first character of the token resides + + + The character position of first character within the line + + + The channel number for the current token + + + The token type for the current token + + + + You can set the text for the current token to override what is in + the input char buffer. Use setText() or can set this instance var. + + + + + All tokens go to the parser (unless skip() is called in that rule) + on a particular "channel". The parser tunes to a particular channel + so that whitespace etc... can go to the parser on a "hidden" channel. + + + + + Anything on different channel than DEFAULT_CHANNEL is not parsed + by parser. + + + + Useful for dumping out the input stream after doing some + augmentation or other manipulations. + + You can insert stuff, replace, and delete chunks. Note that the + operations are done lazily--only if you convert the buffer to a + String. This is very efficient because you are not moving data around + all the time. As the buffer of tokens is converted to strings, the + toString() method(s) check to see if there is an operation at the + current index. If so, the operation is done and then normal String + rendering continues on the buffer. This is like having multiple Turing + machine instruction streams (programs) operating on a single input tape. :) + + Since the operations are done lazily at toString-time, operations do not + screw up the token index values. That is, an insert operation at token + index i does not change the index values for tokens i+1..n-1. + + Because operations never actually alter the buffer, you may always get + the original token stream back without undoing anything. Since + the instructions are queued up, you can easily simulate transactions and + roll back any changes if there is an error just by removing instructions. + For example, + + CharStream input = new ANTLRFileStream("input"); + TLexer lex = new TLexer(input); + TokenRewriteStream tokens = new TokenRewriteStream(lex); + T parser = new T(tokens); + parser.startRule(); + + Then in the rules, you can execute + Token t,u; + ... + input.insertAfter(t, "text to put after t");} + input.insertAfter(u, "text after u");} + System.out.println(tokens.toString()); + + Actually, you have to cast the 'input' to a TokenRewriteStream. :( + + You can also have multiple "instruction streams" and get multiple + rewrites from a single pass over the input. Just name the instruction + streams and use that name again when printing the buffer. This could be + useful for generating a C file and also its header file--all from the + same buffer: + + tokens.insertAfter("pass1", t, "text to put after t");} + tokens.insertAfter("pass2", u, "text after u");} + System.out.println(tokens.toString("pass1")); + System.out.println(tokens.toString("pass2")); + + If you don't use named rewrite streams, a "default" stream is used as + the first example shows. + + + What index into rewrites List are we? + + + Token buffer index. + + + + Execute the rewrite operation by possibly adding to the buffer. + Return the index of the next token to operate on. + + + + + I'm going to try replacing range from x..y with (y-x)+1 ReplaceOp + instructions. + + + + + You may have multiple, named streams of rewrite operations. + I'm calling these things "programs." + Maps String (name) -> rewrite (List) + + + + Map String (program name) -> Integer index + + + + Rollback the instruction stream for a program so that + the indicated instruction (via instructionIndex) is no + longer in the stream. UNTESTED! + + + + Reset the program so that no instructions exist + + + We need to combine operations and report invalid operations (like + overlapping replaces that are not completed nested). Inserts to + same index need to be combined etc... Here are the cases: + + I.i.u I.j.v leave alone, nonoverlapping + I.i.u I.i.v combine: Iivu + + R.i-j.u R.x-y.v | i-j in x-y delete first R + R.i-j.u R.i-j.v delete first R + R.i-j.u R.x-y.v | x-y in i-j ERROR + R.i-j.u R.x-y.v | boundaries overlap ERROR + + Delete special case of replace (text==null): + D.i-j.u D.x-y.v | boundaries overlap combine to max(min)..max(right) + + I.i.u R.x-y.v | i in (x+1)-y delete I (since insert before + we're not deleting i) + I.i.u R.x-y.v | i not in (x+1)-y leave alone, nonoverlapping + R.x-y.v I.i.u | i in x-y ERROR + R.x-y.v I.x.u R.x-y.uv (combine, delete I) + R.x-y.v I.i.u | i not in x-y leave alone, nonoverlapping + + I.i.u = insert u before op @ index i + R.x-y.u = replace x-y indexed tokens with u + + First we need to examine replaces. For any replace op: + + 1. wipe out any insertions before op within that range. + 2. Drop any replace op before that is contained completely within + that range. + 3. Throw exception upon boundary overlap with any previous replace. + + Then we can deal with inserts: + + 1. for any inserts to same index, combine even if not adjacent. + 2. for any prior replace with same left boundary, combine this + insert with replace and delete this replace. + 3. throw exception if index in same range as previous replace + + Don't actually delete; make op null in list. Easier to walk list. + Later we can throw as we add to index -> op map. + + Note that I.2 R.2-2 will wipe out I.2 even though, technically, the + inserted stuff would be before the replace range. But, if you + add tokens in front of a method body '{' and then delete the method + body, I think the stuff before the '{' you added should disappear too. + + Return a map from token index to operation. + + + Get all operations before an index of a particular kind + + + + In an action, a lexer rule can set token to this SKIP_TOKEN and ANTLR + will avoid creating a token for this symbol and try to fetch another. + + + + imaginary tree navigation type; traverse "get child" link + + + imaginary tree navigation type; finish with a child list + + + + A generic tree implementation with no payload. You must subclass to + actually have any user data. ANTLR v3 uses a list of children approach + instead of the child-sibling approach in v2. A flat tree (a list) is + an empty node whose children represent the list. An empty, but + non-null node is called "nil". + + + + + Create a new node from an existing node does nothing for BaseTree + as there are no fields other than the children list, which cannot + be copied as the children are not considered part of this node. + + + + + Get the children internal List; note that if you directly mess with + the list, do so at your own risk. + + + + BaseTree doesn't track parent pointers. + + + BaseTree doesn't track child indexes. + + + Add t as child of this node. + + + Warning: if t has no children, but child does + and child isNil then this routine moves children to t via + t.children = child.children; i.e., without copying the array. + + + + Add all elements of kids list as children of this node + + + Insert child t at child position i (0..n-1) by shifting children + i+1..n-1 to the right one position. Set parent / indexes properly + but does NOT collapse nil-rooted t's that come in here like addChild. + + + + Delete children from start to stop and replace with t even if t is + a list (nil-root tree). num of children can increase or decrease. + For huge child lists, inserting children can force walking rest of + children to set their childindex; could be slow. + + + + Override in a subclass to change the impl of children list + + + Set the parent and child index values for all child of t + + + Walk upwards looking for ancestor with this token type. + + + Walk upwards and get first ancestor with this token type. + + + + Return a list of all ancestors of this node. The first node of + list is the root and the last is the parent of this node. + + + + Print out a whole tree not just a node + + + Override to say how a node (not a tree) should look as text + + + A TreeAdaptor that works with any Tree implementation. + + + + System.identityHashCode() is not always unique; we have to + track ourselves. That's ok, it's only for debugging, though it's + expensive: we have to create a hashtable with all tree nodes in it. + + + + + Create tree node that holds the start and stop tokens associated + with an error. + + + + If you specify your own kind of tree nodes, you will likely have to + override this method. CommonTree returns Token.INVALID_TOKEN_TYPE + if no token payload but you might have to set token type for diff + node type. + + You don't have to subclass CommonErrorNode; you will likely need to + subclass your own tree node class to avoid class cast exception. + + + + + This is generic in the sense that it will work with any kind of + tree (not just ITree interface). It invokes the adaptor routines + not the tree node routines to do the construction. + + + + + Add a child to the tree t. If child is a flat tree (a list), make all + in list children of t. Warning: if t has no children, but child does + and child isNil then you can decide it is ok to move children to t via + t.children = child.children; i.e., without copying the array. Just + make sure that this is consistent with have the user will build + ASTs. + + + + + If oldRoot is a nil root, just copy or move the children to newRoot. + If not a nil root, make oldRoot a child of newRoot. + + + + old=^(nil a b c), new=r yields ^(r a b c) + old=^(a b c), new=r yields ^(r ^(a b c)) + + If newRoot is a nil-rooted single child tree, use the single + child as the new root node. + + old=^(nil a b c), new=^(nil r) yields ^(r a b c) + old=^(a b c), new=^(nil r) yields ^(r ^(a b c)) + + If oldRoot was null, it's ok, just return newRoot (even if isNil). + + old=null, new=r yields r + old=null, new=^(nil r) yields ^(nil r) + + Return newRoot. Throw an exception if newRoot is not a + simple node or nil root with a single child node--it must be a root + node. If newRoot is ^(nil x) return x as newRoot. + + Be advised that it's ok for newRoot to point at oldRoot's + children; i.e., you don't have to copy the list. We are + constructing these nodes so we should have this control for + efficiency. + + + + Transform ^(nil x) to x and nil to null + + + + Tell me how to create a token for use with imaginary token nodes. + For example, there is probably no input symbol associated with imaginary + token DECL, but you need to create it as a payload or whatever for + the DECL node as in ^(DECL type ID). + + + + If you care what the token payload objects' type is, you should + override this method and any other createToken variant. + + + + + Tell me how to create a token for use with imaginary token nodes. + For example, there is probably no input symbol associated with imaginary + token DECL, but you need to create it as a payload or whatever for + the DECL node as in ^(DECL type ID). + + + + This is a variant of createToken where the new token is derived from + an actual real input token. Typically this is for converting '{' + tokens to BLOCK etc... You'll see + + r : lc='{' ID+ '}' -> ^(BLOCK[$lc] ID+) ; + + If you care what the token payload objects' type is, you should + override this method and any other createToken variant. + + + + + Duplicate a node. This is part of the factory; + override if you want another kind of node to be built. + + + + I could use reflection to prevent having to override this + but reflection is slow. + + + + + Track start/stop token for subtree root created for a rule. + Only works with Tree nodes. For rules that match nothing, + seems like this will yield start=i and stop=i-1 in a nil node. + Might be useful info so I'll not force to be i..i. + + + + A buffered stream of tree nodes. Nodes can be from a tree of ANY kind. + + This node stream sucks all nodes out of the tree specified in + the constructor during construction and makes pointers into + the tree using an array of Object pointers. The stream necessarily + includes pointers to DOWN and UP and EOF nodes. + + This stream knows how to mark/release for backtracking. + + This stream is most suitable for tree interpreters that need to + jump around a lot or for tree parsers requiring speed (at cost of memory). + There is some duplicated functionality here with UnBufferedTreeNodeStream + but just in bookkeeping, not tree walking etc... + + TARGET DEVELOPERS: + + This is the old CommonTreeNodeStream that buffered up entire node stream. + No need to implement really as new CommonTreeNodeStream is much better + and covers what we need. + + @see CommonTreeNodeStream + + + The complete mapping from stream index to tree node. + This buffer includes pointers to DOWN, UP, and EOF nodes. + It is built upon ctor invocation. The elements are type + Object as we don't what the trees look like. + + Load upon first need of the buffer so we can set token types + of interest for reverseIndexing. Slows us down a wee bit to + do all of the if p==-1 testing everywhere though. + + + Pull nodes from which tree? + + + IF this tree (root) was created from a token stream, track it. + + + What tree adaptor was used to build these trees + + + Reuse same DOWN, UP navigation nodes unless this is true + + + The index into the nodes list of the current node (next node + to consume). If -1, nodes array not filled yet. + + + Track the last mark() call result value for use in rewind(). + + + Stack of indexes used for push/pop calls + + + Walk tree with depth-first-search and fill nodes buffer. + Don't do DOWN, UP nodes if its a list (t is isNil). + + + What is the stream index for node? 0..n-1 + Return -1 if node not found. + + + As we flatten the tree, we use UP, DOWN nodes to represent + the tree structure. When debugging we need unique nodes + so instantiate new ones when uniqueNavigationNodes is true. + + + Look backwards k nodes + + + + Make stream jump to a new location, saving old location. + Switch back with pop(). + + + + + Seek back to previous index saved during last push() call. + Return top of stack (return index). + + + + Used for testing, just return the token type stream + + + Debugging + + + A node representing erroneous token range in token stream + + + + A tree node that is wrapper for a Token object. After 3.0 release + while building tree rewrite stuff, it became clear that computing + parent and child index is very difficult and cumbersome. Better to + spend the space in every tree node. If you don't want these extra + fields, it's easy to cut them out in your own BaseTree subclass. + + + + A single token is the payload + + + + What token indexes bracket all tokens associated with this node + and below? + + + + Who is the parent node of this node; if null, implies node is root + + + What index is this node in the child list? Range: 0..n-1 + + + + For every node in this subtree, make sure it's start/stop token's + are set. Walk depth first, visit bottom up. Only updates nodes + with at least one token index < 0. + + + + + A TreeAdaptor that works with any Tree implementation. It provides + really just factory methods; all the work is done by BaseTreeAdaptor. + If you would like to have different tokens created than ClassicToken + objects, you need to override this and then set the parser tree adaptor to + use your subclass. + + + + To get your parser to build nodes of a different type, override + create(Token), errorNode(), and to be safe, YourTreeClass.dupNode(). + dupNode is called to duplicate nodes during rewrite operations. + + + + + Tell me how to create a token for use with imaginary token nodes. + For example, there is probably no input symbol associated with imaginary + token DECL, but you need to create it as a payload or whatever for + the DECL node as in ^(DECL type ID). + + + + If you care what the token payload objects' type is, you should + override this method and any other createToken variant. + + + + + Tell me how to create a token for use with imaginary token nodes. + For example, there is probably no input symbol associated with imaginary + token DECL, but you need to create it as a payload or whatever for + the DECL node as in ^(DECL type ID). + + + + This is a variant of createToken where the new token is derived from + an actual real input token. Typically this is for converting '{' + tokens to BLOCK etc... You'll see + + r : lc='{' ID+ '}' -> ^(BLOCK[$lc] ID+) ; + + If you care what the token payload objects' type is, you should + override this method and any other createToken variant. + + + + + What is the Token associated with this node? If + you are not using CommonTree, then you must + override this in your own adaptor. + + + + Pull nodes from which tree? + + + If this tree (root) was created from a token stream, track it. + + + What tree adaptor was used to build these trees + + + The tree iterator we are using + + + Stack of indexes used for push/pop calls + + + Tree (nil A B C) trees like flat A B C streams + + + Tracks tree depth. Level=0 means we're at root node level. + + + Tracks the last node before the start of {@link #data} which contains + position information to provide information for error reporting. This is + tracked in addition to {@link #prevElement} which may or may not contain + position information. + + @see #hasPositionInformation + @see RecognitionException#extractInformationFromTreeNodeStream + + + Make stream jump to a new location, saving old location. + Switch back with pop(). + + + Seek back to previous index saved during last push() call. + Return top of stack (return index). + + + Returns an element containing position information. If {@code allowApproximateLocation} is {@code false}, then + this method will return the {@code LT(1)} element if it contains position information, and otherwise return {@code null}. + If {@code allowApproximateLocation} is {@code true}, then this method will return the last known element containing position information. + + @see #hasPositionInformation + + + For debugging; destructive: moves tree iterator to end. + + + A utility class to generate DOT diagrams (graphviz) from + arbitrary trees. You can pass in your own templates and + can pass in any kind of tree or use Tree interface method. + I wanted this separator so that you don't have to include + ST just to use the org.antlr.runtime.tree.* package. + This is a set of non-static methods so you can subclass + to override. For example, here is an invocation: + + CharStream input = new ANTLRInputStream(System.in); + TLexer lex = new TLexer(input); + CommonTokenStream tokens = new CommonTokenStream(lex); + TParser parser = new TParser(tokens); + TParser.e_return r = parser.e(); + Tree t = (Tree)r.tree; + System.out.println(t.toStringTree()); + DOTTreeGenerator gen = new DOTTreeGenerator(); + StringTemplate st = gen.toDOT(t); + System.out.println(st); + + + Track node to number mapping so we can get proper node name back + + + Track node number so we can get unique node names + + + Generate DOT (graphviz) for a whole tree not just a node. + For example, 3+4*5 should generate: + + digraph { + node [shape=plaintext, fixedsize=true, fontsize=11, fontname="Courier", + width=.4, height=.2]; + edge [arrowsize=.7] + "+"->3 + "+"->"*" + "*"->4 + "*"->5 + } + + Takes a Tree interface object. + + + + @author Sam Harwell + + + Returns an element containing concrete information about the current + position in the stream. + + @param allowApproximateLocation if {@code false}, this method returns + {@code null} if an element containing exact information about the current + position is not available + + + Determines if the specified {@code element} contains concrete position + information. + + @param element the element to check + @return {@code true} if {@code element} contains concrete position + information, otherwise {@code false} + + + + What does a tree look like? ANTLR has a number of support classes + such as CommonTreeNodeStream that work on these kinds of trees. You + don't have to make your trees implement this interface, but if you do, + you'll be able to use more support code. + + + + NOTE: When constructing trees, ANTLR can build any kind of tree; it can + even use Token objects as trees if you add a child list to your tokens. + + This is a tree node without any payload; just navigation and factory stuff. + + + + Is there is a node above with token type ttype? + + + Walk upwards and get first ancestor with this token type. + + + + Return a list of all ancestors of this node. The first node of + list is the root and the last is the parent of this node. + + + + This node is what child index? 0..n-1 + + + Set the parent and child index values for all children + + + + Add t as a child to this node. If t is null, do nothing. If t + is nil, add all children of t to this' children. + + + + Set ith child (0..n-1) to t; t must be non-null and non-nil node + + + + Delete children from start to stop and replace with t even if t is + a list (nil-root tree). num of children can increase or decrease. + For huge child lists, inserting children can force walking rest of + children to set their childindex; could be slow. + + + + + Indicates the node is a nil node but may still have children, meaning + the tree is a flat list. + + + + + What is the smallest token index (indexing from 0) for this node + and its children? + + + + + What is the largest token index (indexing from 0) for this node + and its children? + + + + Return a token type; needed for tree parsing + + + In case we don't have a token payload, what is the line for errors? + + + + How to create and navigate trees. Rather than have a separate factory + and adaptor, I've merged them. Makes sense to encapsulate. + + + + This takes the place of the tree construction code generated in the + generated code in 2.x and the ASTFactory. + + I do not need to know the type of a tree at all so they are all + generic Objects. This may increase the amount of typecasting needed. :( + + + + + Create a tree node from Token object; for CommonTree type trees, + then the token just becomes the payload. This is the most + common create call. + + + + Override if you want another kind of node to be built. + + + + + Create a new node derived from a token, with a new token type. + This is invoked from an imaginary node ref on right side of a + rewrite rule as IMAG[$tokenLabel]. + + + + This should invoke createToken(Token). + + + + + Same as create(tokenType,fromToken) except set the text too. + This is invoked from an imaginary node ref on right side of a + rewrite rule as IMAG[$tokenLabel, "IMAG"]. + + + + This should invoke createToken(Token). + + + + + Same as create(fromToken) except set the text too. + This is invoked when the text terminal option is set, as in + IMAG<text='IMAG'>. + + + + This should invoke createToken(Token). + + + + + Create a new node derived from a token, with a new token type. + This is invoked from an imaginary node ref on right side of a + rewrite rule as IMAG["IMAG"]. + + + + This should invoke createToken(int,String). + + + + Duplicate a single tree node. + Override if you want another kind of node to be built. + + + Duplicate tree recursively, using dupNode() for each node + + + + Return a nil node (an empty but non-null node) that can hold + a list of element as the children. If you want a flat tree (a list) + use "t=adaptor.nil(); t.addChild(x); t.addChild(y);" + + + + + Return a tree node representing an error. This node records the + tokens consumed during error recovery. The start token indicates the + input symbol at which the error was detected. The stop token indicates + the last symbol consumed during recovery. + + + + You must specify the input stream so that the erroneous text can + be packaged up in the error node. The exception could be useful + to some applications; default implementation stores ptr to it in + the CommonErrorNode. + + This only makes sense during token parsing, not tree parsing. + Tree parsing should happen only when parsing and tree construction + succeed. + + + + Is tree considered a nil node used to make lists of child nodes? + + + + Add a child to the tree t. If child is a flat tree (a list), make all + in list children of t. Warning: if t has no children, but child does + and child isNil then you can decide it is ok to move children to t via + t.children = child.children; i.e., without copying the array. Just + make sure that this is consistent with have the user will build + ASTs. Do nothing if t or child is null. + + + + + If oldRoot is a nil root, just copy or move the children to newRoot. + If not a nil root, make oldRoot a child of newRoot. + + + + old=^(nil a b c), new=r yields ^(r a b c) + old=^(a b c), new=r yields ^(r ^(a b c)) + + If newRoot is a nil-rooted single child tree, use the single + child as the new root node. + + old=^(nil a b c), new=^(nil r) yields ^(r a b c) + old=^(a b c), new=^(nil r) yields ^(r ^(a b c)) + + If oldRoot was null, it's ok, just return newRoot (even if isNil). + + old=null, new=r yields r + old=null, new=^(nil r) yields ^(nil r) + + Return newRoot. Throw an exception if newRoot is not a + simple node or nil root with a single child node--it must be a root + node. If newRoot is ^(nil x) return x as newRoot. + + Be advised that it's ok for newRoot to point at oldRoot's + children; i.e., you don't have to copy the list. We are + constructing these nodes so we should have this control for + efficiency. + + + + + Given the root of the subtree created for this rule, post process + it to do any simplifications or whatever you want. A required + behavior is to convert ^(nil singleSubtree) to singleSubtree + as the setting of start/stop indexes relies on a single non-nil root + for non-flat trees. + + + + Flat trees such as for lists like "idlist : ID+ ;" are left alone + unless there is only one ID. For a list, the start/stop indexes + are set in the nil node. + + This method is executed after all rule tree construction and right + before setTokenBoundaries(). + + + + For identifying trees. + + + How to identify nodes so we can say "add node to a prior node"? + Even becomeRoot is an issue. Use System.identityHashCode(node) + usually. + + + + + Create a node for newRoot make it the root of oldRoot. + If oldRoot is a nil root, just copy or move the children to newRoot. + If not a nil root, make oldRoot a child of newRoot. + + + + Return node created for newRoot. + + + + Be advised: when debugging ASTs, the DebugTreeAdaptor manually + calls create(Token child) and then plain becomeRoot(node, node) + because it needs to trap calls to create, but it can't since it delegates + to not inherits from the TreeAdaptor. + + + + For tree parsing, I need to know the token type of a node + + + Node constructors can set the type of a node + + + Node constructors can set the text of a node + + + + Return the token object from which this node was created. + Currently used only for printing an error message. + The error display routine in BaseRecognizer needs to + display where the input the error occurred. If your + tree of limitation does not store information that can + lead you to the token, you can create a token filled with + the appropriate information and pass that back. See + BaseRecognizer.getErrorMessage(). + + + + + Where are the bounds in the input token stream for this node and + all children? Each rule that creates AST nodes will call this + method right before returning. Flat trees (i.e., lists) will + still usually have a nil root node just to hold the children list. + That node would contain the start/stop indexes then. + + + + Get the token start index for this subtree; return -1 if no such index + + + Get the token stop index for this subtree; return -1 if no such index + + + Get a child 0..n-1 node + + + Set ith child (0..n-1) to t; t must be non-null and non-nil node + + + Remove ith child and shift children down from right. + + + How many children? If 0, then this is a leaf node + + + + Who is the parent node of this node; if null, implies node is root. + If your node type doesn't handle this, it's ok but the tree rewrites + in tree parsers need this functionality. + + + + + What index is this node in the child list? Range: 0..n-1 + If your node type doesn't handle this, it's ok but the tree rewrites + in tree parsers need this functionality. + + + + + Replace from start to stop child index of parent with t, which might + be a list. Number of children may be different after this call. + + + + If parent is null, don't do anything; must be at root of overall tree. + Can't replace whatever points to the parent externally. Do nothing. + + + + A stream of tree nodes, accessing nodes from a tree of some kind + + + + Get a tree node at an absolute index i; 0..n-1. + If you don't want to buffer up nodes, then this method makes no + sense for you. + + + + + Get tree node at current input pointer + ahead where + ==1 is next node. <0 indicates nodes in the past. So + {@code LT(-1)} is previous node, but implementations are not required to + provide results for < -1. {@code LT(0)} is undefined. For + <=n, return . Return for {@code LT(0)} + and any index that results in an absolute address that is negative. + + + + This is analogous to , but this returns a tree node + instead of a . Makes code generation identical for both + parser and tree grammars. + + + + + Where is this stream pulling nodes from? This is not the name, but + the object that provides node objects. + + + + + If the tree associated with this stream was created from a + {@link TokenStream}, you can specify it here. Used to do rule + {@code $text} attribute in tree parser. Optional unless you use tree + parser rule {@code $text} attribute or {@code output=template} and + {@code rewrite=true} options. + + + + + What adaptor can tell me how to interpret/navigate nodes and + trees. E.g., get text of a node. + + + + + As we flatten the tree, we use {@link Token#UP}, {@link Token#DOWN} nodes + to represent the tree structure. When debugging we need unique nodes so + we have to instantiate new ones. When doing normal tree parsing, it's + slow and a waste of memory to create unique navigation nodes. Default + should be {@code false}. + + + + + Return the text of all nodes from {@code start} to {@code stop}, + inclusive. If the stream does not buffer all the nodes then it can still + walk recursively from start until stop. You can always return + {@code null} or {@code ""} too, but users should not access + {@code $ruleLabel.text} in an action of course in that case. + + + + + Replace children of {@code parent} from index {@code startChildIndex} to + {@code stopChildIndex} with {@code t}, which might be a list. Number of + children may be different after this call. The stream is notified because + it is walking the tree and might need to know you are monkeying with the + underlying tree. Also, it might be able to modify the node stream to + avoid restreaming for future phases. + + + + If {@code parent} is {@code null}, don't do anything; must be at root of + overall tree. Can't replace whatever points to the parent externally. Do + nothing. + + + + + How to execute code for node t when a visitor visits node t. Execute + pre() before visiting children and execute post() after visiting children. + + + + + Execute an action before visiting children of t. Return t or + a rewritten t. It is up to the visitor to decide what to do + with the return value. Children of returned value will be + visited if using TreeVisitor.visit(). + + + + + Execute an action after visiting children of t. Return t or + a rewritten t. It is up to the visitor to decide what to do + with the return value. + + + + + A record of the rules used to match a token sequence. The tokens + end up as the leaves of this tree and rule nodes are the interior nodes. + This really adds no functionality, it is just an alias for CommonTree + that is more meaningful (specific) and holds a String to display for a node. + + + + + Emit a token and all hidden nodes before. EOF node holds all + hidden tokens after last real token. + + + + + Print out the leaves of this tree, which means printing original + input back out. + + + + + Base class for all exceptions thrown during AST rewrite construction. + This signifies a case where the cardinality of two or more elements + in a subrule are different: (ID INT)+ where |ID|!=|INT| + + + + No elements within a (...)+ in a rewrite rule + + + Ref to ID or expr but no tokens in ID stream or subtrees in expr stream + + + + A generic list of elements tracked in an alternative to be used in + a -> rewrite rule. We need to subclass to fill in the next() method, + which returns either an AST node wrapped around a token payload or + an existing subtree. + + + + Once you start next()ing, do not try to add more elements. It will + break the cursor tracking I believe. + + TODO: add mechanism to detect/puke on modification after reading from stream + + + + + + + + Cursor 0..n-1. If singleElement!=null, cursor is 0 until you next(), + which bumps it to 1 meaning no more elements. + + + + Track single elements w/o creating a list. Upon 2nd add, alloc list + + + The list of tokens or subtrees we are tracking + + + Once a node / subtree has been used in a stream, it must be dup'd + from then on. Streams are reset after subrules so that the streams + can be reused in future subrules. So, reset must set a dirty bit. + If dirty, then next() always returns a dup. + + + The element or stream description; usually has name of the token or + rule reference that this list tracks. Can include rulename too, but + the exception would track that info. + + + Create a stream with one element + + + Create a stream, but feed off an existing list + + + + Reset the condition of this stream so that it appears we have + not consumed any of its elements. Elements themselves are untouched. + Once we reset the stream, any future use will need duplicates. Set + the dirty bit. + + + + + Return the next element in the stream. If out of elements, throw + an exception unless size()==1. If size is 1, then return elements[0]. + Return a duplicate node/subtree if stream is out of elements and + size==1. If we've already used the element, dup (dirty bit set). + + + + + Do the work of getting the next element, making sure that it's + a tree node or subtree. Deal with the optimization of single- + element list versus list of size > 1. Throw an exception + if the stream is empty or we're out of elements and size>1. + protected so you can override in a subclass if necessary. + + + + + When constructing trees, sometimes we need to dup a token or AST + subtree. Dup'ing a token means just creating another AST node + around it. For trees, you must call the adaptor.dupTree() unless + the element is for a tree root; then it must be a node dup. + + + + + Ensure stream emits trees; tokens must be converted to AST nodes. + AST nodes can be passed through unmolested. + + + + + Queues up nodes matched on left side of -> in a tree parser. This is + the analog of RewriteRuleTokenStream for normal parsers. + + + + Create a stream with one element + + + Create a stream, but feed off an existing list + + + Create a stream with one element + + + Create a stream, but feed off an existing list + + + + Treat next element as a single node even if it's a subtree. + This is used instead of next() when the result has to be a + tree root node. Also prevents us from duplicating recently-added + children; e.g., ^(type ID)+ adds ID to type and then 2nd iteration + must dup the type node, but ID has been added. + + + + Referencing a rule result twice is ok; dup entire tree as + we can't be adding trees as root; e.g., expr expr. + + Hideous code duplication here with super.next(). Can't think of + a proper way to refactor. This needs to always call dup node + and super.next() doesn't know which to call: dup node or dup tree. + + + + Create a stream with one element + + + Create a stream, but feed off an existing list + + + Get next token from stream and make a node for it + + + + Don't convert to a tree unless they explicitly call nextTree. + This way we can do hetero tree nodes in rewrite. + + + + Return a node stream from a doubly-linked tree whose nodes + know what child index they are. No remove() is supported. + + Emit navigation nodes (DOWN, UP, and EOF) to let show tree structure. + + + If we emit UP/DOWN nodes, we need to spit out multiple nodes per + next() call. + + + + A parser for a stream of tree nodes. "tree grammars" result in a subclass + of this. All the error reporting and recovery is shared with Parser via + the BaseRecognizer superclass. + + + + Set the input stream + + + + Match '.' in tree parser has special meaning. Skip node or + entire tree if node has children. If children, scan until + corresponding UP node. + + + + + We have DOWN/UP nodes in the stream that have no line info; override. + plus we want to alter the exception type. Don't try to recover + from tree parser errors inline... + + + + + Prefix error message with the grammar name because message is + always intended for the programmer because the parser built + the input tree not the user. + + + + + Tree parsers parse nodes they usually have a token object as + payload. Set the exception token and do the default behavior. + + + + The tree pattern to lex like "(A B C)" + + + Index into input string + + + Current char + + + How long is the pattern in char? + + + Set when token type is ID or ARG (name mimics Java's StreamTokenizer) + + + Override this if you need transformation tracing to go somewhere + other than stdout or if you're not using ITree-derived trees. + + + + This is identical to the ParserRuleReturnScope except that + the start property is a tree nodes not Token object + when you are parsing trees. + + + + Gets the first node or root node of tree matched for this rule. + + + Do a depth first walk of a tree, applying pre() and post() actions as we go. + + + + Visit every node in tree t and trigger an action for each node + before/after having visited all of its children. Bottom up walk. + Execute both actions even if t has no children. Ignore return + results from transforming children since they will have altered + the child list of this node (their parent). Return result of + applying post action to this node. + + + + + Build and navigate trees with this object. Must know about the names + of tokens so you have to pass in a map or array of token names (from which + this class can build the map). I.e., Token DECL means nothing unless the + class can translate it to a token type. + + + + In order to create nodes and navigate, this class needs a TreeAdaptor. + + This class can build a token type -> node index for repeated use or for + iterating over the various nodes with a particular type. + + This class works in conjunction with the TreeAdaptor rather than moving + all this functionality into the adaptor. An adaptor helps build and + navigate trees using methods. This class helps you do it with string + patterns like "(A B C)". You can create a tree from that pattern or + match subtrees against it. + + + + + When using %label:TOKENNAME in a tree for parse(), we must + track the label. + + + + This adaptor creates TreePattern objects for use during scan() + + + + Compute a Map<String, Integer> that is an inverted index of + tokenNames (which maps int token types to names). + + + + Using the map of token names to token types, return the type. + + + + Walk the entire tree and make a node name to nodes mapping. + For now, use recursion but later nonrecursive version may be + more efficient. Returns Map<Integer, List> where the List is + of your AST node type. The Integer is the token type of the node. + + + + TODO: save this index so that find and visit are faster + + + + Do the work for index + + + Return a List of tree nodes with token type ttype + + + Return a List of subtrees matching pattern. + + + + Visit every ttype node in t, invoking the visitor. This is a quicker + version of the general visit(t, pattern) method. The labels arg + of the visitor action method is never set (it's null) since using + a token type rather than a pattern doesn't let us set a label. + + + + Do the recursive work for visit + + + + For all subtrees that match the pattern, execute the visit action. + The implementation uses the root node of the pattern in combination + with visit(t, ttype, visitor) so nil-rooted patterns are not allowed. + Patterns with wildcard roots are also not allowed. + + + + + Given a pattern like (ASSIGN %lhs:ID %rhs:.) with optional labels + on the various nodes and '.' (dot) as the node/subtree wildcard, + return true if the pattern matches and fill the labels Map with + the labels pointing at the appropriate nodes. Return false if + the pattern is malformed or the tree does not match. + + + + If a node specifies a text arg in pattern, then that must match + for that node in t. + + TODO: what's a better way to indicate bad pattern? Exceptions are a hassle + + + + + Do the work for parse. Check to see if the t2 pattern fits the + structure and token types in t1. Check text if the pattern has + text arguments on nodes. Fill labels map with pointers to nodes + in tree matched against nodes in pattern with labels. + + + + + Create a tree or node from the indicated tree pattern that closely + follows ANTLR tree grammar tree element syntax: + + (root child1 ... child2). + + + + You can also just pass in a node: ID + + Any node can have a text argument: ID[foo] + (notice there are no quotes around foo--it's clear it's a string). + + nil is a special name meaning "give me a nil node". Useful for + making lists: (nil A B C) is a list of A B C. + + + + + Compare t1 and t2; return true if token types/text, structure match exactly. + The trees are examined in their entirety so that (A B) does not match + (A B C) nor (A (B C)). + + + + TODO: allow them to pass in a comparator + TODO: have a version that is nonstatic so it can use instance adaptor + + I cannot rely on the tree node's equals() implementation as I make + no constraints at all on the node types nor interface etc... + + + + + Compare type, structure, and text of two trees, assuming adaptor in + this instance of a TreeWizard. + + + + A token stream that pulls tokens from the code source on-demand and + without tracking a complete buffer of the tokens. This stream buffers + the minimum number of tokens possible. It's the same as + OnDemandTokenStream except that OnDemandTokenStream buffers all tokens. + + You can't use this stream if you pass whitespace or other off-channel + tokens to the parser. The stream can't ignore off-channel tokens. + + You can only look backwards 1 token: LT(-1). + + Use this when you need to read from a socket or other infinite stream. + + @see BufferedTokenStream + @see CommonTokenStream + + + Skip tokens on any channel but this one; this is how we skip whitespace... + + + An extra token while parsing a TokenStream + + + diff --git a/nhibernateg7/nhibernateg7/bin/Debug/Iesi.Collections.dll b/nhibernateg7/nhibernateg7/bin/Debug/Iesi.Collections.dll new file mode 100644 index 0000000..c35d072 Binary files /dev/null and b/nhibernateg7/nhibernateg7/bin/Debug/Iesi.Collections.dll differ diff --git a/nhibernateg7/nhibernateg7/bin/Debug/Iesi.Collections.xml b/nhibernateg7/nhibernateg7/bin/Debug/Iesi.Collections.xml new file mode 100644 index 0000000..b3d4d8c --- /dev/null +++ b/nhibernateg7/nhibernateg7/bin/Debug/Iesi.Collections.xml @@ -0,0 +1,552 @@ + + + + Iesi.Collections + + + + + Implementation of ISet that also maintains a linked list over all elements. + Enumeration of this set is guaranteed to return the elements in the order + they were added. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Adds an item to the . + + The object to add to the .The is read-only. + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets a value indicating whether the is read-only. + + + true if the is read-only; otherwise, false. + + + + + Removes all items from the . + + The is read-only. + + + + Determines whether the contains a specific value. + + + true if is found in the ; otherwise, false. + + The object to locate in the . + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.The zero-based index in at which copying begins. is null. is less than 0. is multidimensional.-or-The number of elements in the source is greater than the available space from to the end of the destination .-or-Type cannot be cast automatically to the type of the destination . + + + + Removes the first occurrence of a specific object from the . + + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + The object to remove from the .The is read-only. + + + + Modifies the current set so that it contains all elements that are present in either the current set or the specified collection. + + The collection to compare to the current set. is null. + + + + Modifies the current set so that it contains only elements that are also in a specified collection. + + The collection to compare to the current set. is null. + + + + Removes all elements in the specified collection from the current set. + + The collection of items to remove from the set. is null. + + + + Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both. + + The collection to compare to the current set. is null. + + + + Determines whether a set is a subset of a specified collection. + + + true if the current set is a subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a superset of a specified collection. + + + true if the current set is a superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a correct superset of a specified collection. + + + true if the object is a correct superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a proper (strict) subset of a specified collection. + + + true if the current set is a correct subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set overlaps with the specified collection. + + + true if the current set and share at least one common element; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set and the specified collection contain the same elements. + + + true if the current set is equal to ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Adds an element to the current set and returns a value to indicate if the element was successfully added. + + + true if the element is added to the set; false if the element is already in the set. + + The element to add to the set. + + + + Count the elements in the given collection and determine both the total + count and how many of the elements that are present in the current set. + + + + + Cast the given collection to an ISet<T> if possible. If not, + return a new set containing the items. + + + + + Unlink a node from the linked list by updating the node pointers in + its preceeding and subsequent node. Also update the _first and _last + pointers if necessary. + + + + +

Implements a read-only Set wrapper.

+

Although this is advertised as immutable, it really isn't. Anyone with access to the + wrapped set can still change the set.

+
+
+ + + Constructs an immutable (read-only) Set wrapper. + + The Set that is wrapped. + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Adds an item to the . + + The object to add to the . + is always thrown + + + + Removes all items from the . + + is always thrown + + + + Determines whether the contains a specific value. + + + true if is found in the ; otherwise, false. + + The object to locate in the . + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.The zero-based index in at which copying begins. is null. is less than 0. is multidimensional.-or-The number of elements in the source is greater than the available space from to the end of the destination .-or-Type cannot be cast automatically to the type of the destination . + + + + Removes the first occurrence of a specific object from the . + + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + The object to remove from the . + is always thrown + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets a value indicating whether the is read-only. + + + True. + + + + + Adds an element to the current set and returns a value to indicate if the element was successfully added. + + + true if the element is added to the set; false if the element is already in the set. + + The element to add to the set. + is always thrown + + + + Modifies the current set so that it contains all elements that are present in both the current set and in the specified collection. + + The collection to compare to the current set. is null. + is always thrown + + + + Modifies the current set so that it contains only elements that are also in a specified collection. + + The collection to compare to the current set. is null. + is always thrown + + + + Removes all elements in the specified collection from the current set. + + The collection of items to remove from the set. is null. + is always thrown + + + + Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both. + + The collection to compare to the current set. is null. + is always thrown + + + + Determines whether a set is a subset of a specified collection. + + + true if the current set is a subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a superset of a specified collection. + + + true if the current set is a superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a correct superset of a specified collection. + + + true if the object is a correct superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a property (strict) subset of a specified collection. + + + true if the current set is a correct subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set overlaps with the specified collection. + + + true if the current set and share at least one common element; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set and the specified collection contain the same elements. + + + true if the current set is equal to ; otherwise, false. + + The collection to compare to the current set. is null. + + + +

Implements a thread-safe Set wrapper. The implementation is extremely conservative, + serializing critical sections to prevent possible deadlocks, and locking on everything. + The one exception is for enumeration, which is inherently not thread-safe. For this, you + have to lock the SyncRoot object for the duration of the enumeration.

+
+
+ + + Constructs a thread-safe ISet wrapper. + + The Set object that this object will wrap. + + + + Adds an item to the . + + The object to add to the .The is read-only. + + + + Removes all items from the . + + The is read-only. + + + + Determines whether the contains a specific value. + + + true if is found in the ; otherwise, false. + + The object to locate in the . + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.The zero-based index in at which copying begins. is null. is less than 0. is multidimensional.-or-The number of elements in the source is greater than the available space from to the end of the destination .-or-Type cannot be cast automatically to the type of the destination . + + + + Removes the first occurrence of a specific object from the . + + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + The object to remove from the .The is read-only. + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets a value indicating whether the is read-only. + + + true if the is read-only; otherwise, false. + + + + + Modifies the current set so that it contains all elements that are present in either the current set or in the specified collection. + + The collection to compare to the current set. is null. + + + + Modifies the current set so that it contains only elements that are also in a specified collection. + + The collection to compare to the current set. is null. + + + + Removes all elements in the specified collection from the current set. + + The collection of items to remove from the set. is null. + + + + Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both. + + The collection to compare to the current set. is null. + + + + Determines whether a set is a subset of a specified collection. + + + true if the current set is a subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a superset of a specified collection. + + + true if the current set is a superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a correct superset of a specified collection. + + + true if the object is a correct superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a property (strict) subset of a specified collection. + + + true if the current set is a correct subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set overlaps with the specified collection. + + + true if the current set and share at least one common element; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set and the specified collection contain the same elements. + + + true if the current set is equal to ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Adds an element to the current set and returns a value to indicate if the element was successfully added. + + + true if the element is added to the set; false if the element is already in the set. + + The element to add to the set. + + + + Returns an enumerator that iterates through a collection. Enumeration is inherently not + thread-safe. Use a lock on the SyncRoot to synchronize the entire enumeration process. + + + An object that can be used to iterate through the collection. + + 2 + + + + Returns an enumerator that iterates through the collection. Enumeration is inherently not + thread-safe. Use a lock on the SyncRoot to synchronize the entire enumeration process. + + + A that can be used to iterate through the collection. + + 1 + +
+
diff --git a/nhibernateg7/nhibernateg7/bin/Debug/NHibernate.dll b/nhibernateg7/nhibernateg7/bin/Debug/NHibernate.dll new file mode 100644 index 0000000..5750a4e Binary files /dev/null and b/nhibernateg7/nhibernateg7/bin/Debug/NHibernate.dll differ diff --git a/nhibernateg7/nhibernateg7/bin/Debug/NHibernate.xml b/nhibernateg7/nhibernateg7/bin/Debug/NHibernate.xml new file mode 100644 index 0000000..f58a8b2 --- /dev/null +++ b/nhibernateg7/nhibernateg7/bin/Debug/NHibernate.xml @@ -0,0 +1,55754 @@ + + + + NHibernate + + + + + Implementation of BulkOperationCleanupAction. + + + + + Create an action that will evict collection and entity regions based on queryspaces (table names). + + + + + Any action relating to insert/update/delete of a collection + + + + + Initializes a new instance of . + + The that is responsible for the persisting the Collection. + The Persistent collection. + The identifier of the Collection. + The that the Action is occurring in. + + + + What spaces (tables) are affected by this action? + + + + Called before executing any actions + + + Execute this action + + + + Compares the current object with another object of the same type. + + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other. + + An object to compare with this object. + + + Called before executing any actions + A cancellation token that can be used to cancel the work + + + Execute this action + A cancellation token that can be used to cancel the work + + + Execute this action + + This method is called when a new non-null collection is persisted + or when an existing (non-null) collection is moved to a new owner + + + + Execute this action + A cancellation token that can be used to cancel the work + + This method is called when a new non-null collection is persisted + or when an existing (non-null) collection is moved to a new owner + + + + + Removes a persistent collection from its loaded owner. + + The collection to to remove; must be non-null + The collection's persister + The collection key + Indicates if the snapshot is empty + The session + Use this constructor when the collection is non-null. + + + + Removes a persistent collection from a specified owner. + + The collection's owner; must be non-null + The collection's persister + The collection key + Indicates if the snapshot is empty + The session + Use this constructor when the collection to be removed has not been loaded. + + + + Acts as a stand-in for an entity identifier which is supposed to be + generated on insert (like an IDENTITY column) where the insert needed to + be delayed because we were outside a transaction when the persist + occurred (save currently still performs the insert). + + The stand-in is only used within the see cref="NHibernate.Engine.PersistenceContext" + in order to distinguish one instance from another; it is never injected into + the entity instance or returned to the client... + + + + + Base class for actions relating to insert/update/delete of an entity + instance. + + + + + Instantiate an action. + + The session from which this action is coming. + The id of the entity + The entity instance + The entity persister + + + + Entity name accessor + + + + + Entity Id accessor + + + + + Entity Instance + + + + + Session from which this action originated + + + + + The entity persister. + + + + + Contract representing some process that needs to occur during after transaction completion. + + + + + Perform whatever processing is encapsulated here after completion of the transaction. + + Did the transaction complete successfully? True means it did. + + + + Perform whatever processing is encapsulated here after completion of the transaction. + + Did the transaction complete successfully? True means it did. + A cancellation token that can be used to cancel the work + + + + An extension to which allows async cleanup operations to be + scheduled on transaction completion. + + + + + Get the before-transaction-completion process, if any, for this action. + + + + + Get the after-transaction-completion process, if any, for this action. + + + + + Contract representing some process that needs to occur during before transaction completion. + + + + + Perform whatever processing is encapsulated here before completion of the transaction. + + + + + Perform whatever processing is encapsulated here before completion of the transaction. + + A cancellation token that can be used to cancel the work + + + + Delegate representing some process that needs to occur before transaction completion. + + + NH specific: C# does not support dynamic interface proxies so a delegate is used in + place of the Hibernate interface (see Action/BeforeTransactionCompletionProcess). The + delegate omits the parameter as it is not used. + + + + + Delegate representing some process that needs to occur after transaction completion. + + Did the transaction complete successfully? True means it did. + + NH specific: C# does not support dynamic interface proxies so a delegate is used in + place of the Hibernate interface (see Action/AfterTransactionCompletionProcess). The + delegate omits the parameter as it is not used. + + + + + An operation which may be scheduled for later execution. + Usually, the operation is a database insert/update/delete, + together with required second-level cache management. + + + + + What spaces (tables) are affected by this action? + + + + Called before executing any actions + + + Execute this action + + + + Get the before-transaction-completion process, if any, for this action. + + + + + Get the after-transaction-completion process, if any, for this action. + + + + Called before executing any actions + A cancellation token that can be used to cancel the work + + + Execute this action + A cancellation token that can be used to cancel the work + + + + Wraps exceptions that occur during ADO.NET calls. + + + Exceptions thrown by various ADO.NET providers are not derived from + a common base class (SQLException in Java), so + is used instead in NHibernate. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Manages prepared statements and batching. Class exists to enforce separation of concerns + + + + + Initializes a new instance of the class. + + The owning this batcher. + + + + + Gets the current that is contained for this Batch + + The current . + + + + Gets the current that is contained for this Batch + + The current . + + + + Gets the current parameters that are contained for this Batch + + The current . + + + + Prepares the for execution in the database. + + + This takes care of hooking the up to an + and if one exists. It will call Prepare if the Driver + supports preparing commands. + + + + + Ensures that the Driver's rules for Multiple Open DataReaders are being followed. + + + + + Gets or sets the size of the batch, this can change dynamically by + calling the session's SetBatchSize. + + The size of the batch. + + + + Adds the expected row count into the batch. + + The number of rows expected to be affected by the query. + + If Batching is not supported, then this is when the Command should be executed. If Batching + is supported then it should hold of on executing the batch until explicitly told to. + + + + + Gets the the Batcher was + created in. + + + The the Batcher was + created in. + + + + + Gets the for this batcher. + + + + + A flag to indicate if Dispose() has been called. + + + + + Finalizer that ensures the object is correctly disposed of. + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + Indicates if this BatcherImpl is being Disposed of or Finalized. + + If this BatcherImpl is being Finalized (isDisposing==false) then make sure not + to call any methods that could potentially bring this BatcherImpl back to life. + + + + + Prepares the for execution in the database. + + + This takes care of hooking the up to an + and if one exists. It will call Prepare if the Driver + supports preparing commands. + + + + + Ensures that the Driver's rules for Multiple Open DataReaders are being followed. + + A cancellation token that can be used to cancel the work + + + + Adds the expected row count into the batch. + + The number of rows expected to be affected by the query. + A cancellation token that can be used to cancel the work + + If Batching is not supported, then this is when the Command should be executed. If Batching + is supported then it should hold of on executing the batch until explicitly told to. + + + + Implementation of ColumnNameCache. Thread safe. + + + + Manages the database connection and transaction for an . + + + This class corresponds to LogicalConnectionImplementor and JdbcCoordinator + in Hibernate, combined. + + + + + The session responsible for the lifecycle of the connection manager. + + + + + The sessions using the connection manager of the session responsible for it. + + + + + when the connection manager is being used from system transaction completion events, + otherwise. + + + + The batcher managed by this ConnectionManager. + + + + Enlist the connection into provided transaction if the connection should be enlisted. + Do nothing in case an explicit transaction is ongoing. + + The transaction in which the connection should be enlisted. + + + + A generic batcher that will batch UPDATE/INSERT/DELETE commands by concatenating them with a semicolon. + Use this batcher only if there are no dedicated batchers in the given environment. Unfortunately some + database clients do not support concatenating commands with a semicolon. Here are the known clients + that do not work with this batcher: + - FirebirdSql.Data.FirebirdClient + - Oracle.ManagedDataAccess + - System.Data.SqlServerCe + - Sap.Data.Hana + + + + + DML batcher for HANA. + By Jonathan Bregler + + + + Factory for instances. + + + + Provides a default class. + + + This interface allows to specify a default for a specific + . The configuration setting + takes precedence over BatcherFactoryClass. + + + + + The class type. + + + + + Expected row count. Valid only for batchable expectations. + + + + + Supports adjusting a according to a and + the parameter's value. An may implement this interface. + + + + + Adjust the provided parameter according to its and + . + + The parameter to adjust. + The parameter's . + The parameter's value. + + + + An implementation of the + interface that does no batching. + + + + + Initializes a new instance of the class. + + The for this batcher. + + + + + Executes the current and compares the row Count + to the expectedRowCount. + + + The expected number of rows affected by the query. A value of less than 0 + indicates that the number of rows to expect is unknown or should not be a factor. + + + Thrown when there is an expected number of rows to be affected and the + actual number of rows is different. + + + + + This Batcher implementation does not support batching so this is a no-op call. The + actual execution of the is run in the AddToBatch + method. + + + + + + Executes the current and compares the row Count + to the expectedRowCount. + + + The expected number of rows affected by the query. A value of less than 0 + indicates that the number of rows to expect is unknown or should not be a factor. + + A cancellation token that can be used to cancel the work + + Thrown when there is an expected number of rows to be affected and the + actual number of rows is different. + + + + + This Batcher implementation does not support batching so this is a no-op call. The + actual execution of the is run in the AddToBatch + method. + + + A cancellation token that can be used to cancel the work + + + + A BatcherFactory implementation which constructs Batcher instances + that do not perform batch operations. + + + + + Summary description for OracleDataClientBatchingBatcher. + By Tomer Avissar + + + + + A ResultSet delegate, responsible for locally caching the columnName-to-columnIndex + resolution that has been found to be inefficient in a few vendor's drivers (i.e., Oracle + and Postgres). + + + + + + Expose the batch functionality in ADO.Net 4.0 + Microsoft in its wisdom decided to make my life hard and mark it internal. + Through the use of Reflection and some delegates magic, I opened up the functionality. + + Observable performance benefits are 50%+ when used, so it is really worth it. + + + + + Append a command to the batch + + + + + + This is required because SqlClient.SqlCommandSet will throw if + the command has no parameters. + + + + + + Return the batch command to be executed + + + + + The number of commands batched in this instance + + + + + Executes the batch + + + This seems to be returning the total number of affected rows in all queries + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + 2 + + + Format an SQL statement using simple rules: + a) Insert newline after each comma; + b) Indent three spaces after each inserted newline; + If the statement contains single/double quotes return unchanged, + it is too complex and could be broken by simple formatting. + + + + Represents the the understood types or styles of formatting. + + + Centralize logging handling for SQL statements. + + + Constructs a new SqlStatementLogger instance. + + + Constructs a new SqlStatementLogger instance. + Should we log to STDOUT in addition to our internal logger. + Should we format SQL ('prettify') prior to logging. + + + Log a DbCommand. + Title + The SQL statement. + The requested formatting style. + + + Log a DbCommand. + The SQL statement. + The requested formatting style. + + + + Indicates failure of an assertion: a possible bug in NHibernate + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + An abstract batch used for implementing a batch operation of . + + + + + An abstract batch used for implementing a batch operation of . + + + + + Base class for letting implementors define a caching algorithm. + + + + + All implementations must be threadsafe. + + + The key is the identifier of the object that is being cached. The key is in most cases + a . + + + The value can be a , a , + a , an or + implementation, all containing simple values or array of + simple values. It can also be directly a simple value or an array of simple values. + And it can be a containing any of the previous types, or + a . + + + All those types are binary serializable. + + + This base class provides minimal async method implementations delegating their work to their + synchronous counterparts. Override them for supplying actual async operations. + + + Similarly, this base class provides minimal multiple get/put/lock/unlock implementations + delegating their work to their single operation counterparts. Override them if your cache + implementation supports multiple operations. + + + + + + Get multiple items from the cache. + + The keys to be retrieved from the cache. + A cancellation token that can be used to cancel the work + The cached items, matching each key of respectively. For each missed key, + it will contain a . + + As all other Many method, its default implementation just falls back on calling + the single operation method in a loop. Cache providers should override it with an actual multiple + implementation if they can support it. + Additionally, if overriding GetMany, consider overriding also + . + + + + + Add multiple items to the cache. + + The keys of the items. + The items. + A cancellation token that can be used to cancel the work + + + + Lock the items from being concurrently changed. + + The keys of the items. + A cancellation token that can be used to cancel the work + A lock object to use for unlocking the items. Can be . + The implementation is allowed to do nothing for non-clustered cache. + + + + Unlock the items that were previously locked. + + The keys of the items. + The lock object to use for unlocking the items, as received from . + A cancellation token that can be used to cancel the work + The implementation should do nothing if own implementation does nothing. + + + + A reasonable "lock timeout". + + + + + The name of the cache region. + + + + + Should batched get operations be preferred other single get calls? + + + + implementation always yield false, override it if required. + + + This property should yield if delegates + its implementation to . + + + When , NHibernate will attempt to get other non initialized proxies or + collections from the cache instead of only getting the proxy or collection which initialization + is asked for. If this cache implementation does not benefit from batching together get operations, + this may result in a performance loss. + + + When , NHibernate will still call when it has many + gets to perform. Its default implementation is adequate for this case. + + + + + + Get the item from the cache. + + The item key. + The cached item. + + + + Put the item into the cache. + + The item key. + The item. + + + + Remove an item from the cache. + + The item key. + + + + Clear the cache. + + + + + Clean up. + + + + + Lock the item from being concurrently changed. + + The item key. + A lock object to use for unlocking the item. Can be . + The implementation is allowed to do nothing for non-clustered cache. + + + + Unlock an item which was previously locked. + + The item key. + The lock object to use for unlocking the item, as received from . + The implementation should do nothing if own implementation does nothing. + + + + Generate a timestamp. + + A timestamp. + + + + Get multiple items from the cache. + + The keys to be retrieved from the cache. + The cached items, matching each key of respectively. For each missed key, + it will contain a . + + As all other Many method, its default implementation just falls back on calling + the single operation method in a loop. Cache providers should override it with an actual multiple + implementation if they can support it. + Additionally, if overriding GetMany, consider overriding also + . + + + + + Add multiple items to the cache. + + The keys of the items. + The items. + + + + Lock the items from being concurrently changed. + + The keys of the items. + A lock object to use for unlocking the items. Can be . + The implementation is allowed to do nothing for non-clustered cache. + + + + Unlock the items that were previously locked. + + The keys of the items. + The lock object to use for unlocking the items, as received from . + The implementation should do nothing if own implementation does nothing. + + + + Get the item from the cache. + + The item key. + A cancellation token that can be used to cancel the work. + The cached item. + + + + Put the item into the cache. + + The item key. + The item. + A cancellation token that can be used to cancel the work. + + + + Remove an item from the cache. + + The item key. + A cancellation token that can be used to cancel the work. + + + + Clear the cache. + + A cancellation token that can be used to cancel the work. + + + + If this is a clustered cache, lock the item. + + The item key. + A cancellation token that can be used to cancel the work. + A lock object to use for unlocking the key. Can be . + + + + If this is a clustered cache, unlock the item. + + The item key. + The lock object to use for unlocking the key, as received from . + A cancellation token that can be used to cancel the work. + + + + A batcher for batching operations of . + + + + + Executes the pending batches. + + A cancellation token that can be used to cancel the work + + + + Adds a put operation to the batch. + + The entity persister. + The data to put in the cache. + + + + Adds a put operation to the batch. + + The collection persister. + The data to put in the cache. + + + + Executes the pending batches. + + + + + Cleans up the current batch. + + + + + A batch for batching the operation. + + + + + A cached instance of a persistent class + + + + + Used by + + + + + A simple -based cache + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Implementors manage transactional access to cached data. + + + + Transactions pass in a timestamp indicating transaction start time. + + + When used to cache entities and collections the key is the identifier of the + entity/collection and the value should be set to the + for an entity and the results of + for a collection. + + + + + + Attempt to retrieve multiple items from the cache. + + The keys of the items. + A timestamp prior to the transaction start time. + A cancellation token that can be used to cancel the work + The cached items, matching each key of respectively. For each missed key, + it will contain a . + + + + + Attempt to cache items, after loading them from the database. + + The keys of the items. + The items. + A timestamp prior to the transaction start time. + The version numbers of the items. + The comparers to be used to compare version numbers. + Indicates that the cache should avoid a put if the item is already cached. + A cancellation token that can be used to cancel the work + An array of boolean indicating if each item was successfully cached. + + + + + Attempt to retrieve multiple items from the cache. + + The keys of the items. + A timestamp prior to the transaction start time. + The cached items, matching each key of respectively. For each missed key, + it will contain a . + + + + + Attempt to cache items, after loading them from the database. + + The keys of the items. + The items. + A timestamp prior to the transaction start time. + The version numbers of the items. + The comparers to be used to compare version numbers. + Indicates that the cache should avoid a put if the item is already cached. + An array of boolean indicating if each item was successfully cached. + + + + + Implementors define a caching algorithm. + + + + + All implementations must be threadsafe. + + + The key is the identifier of the object that is being cached and the + value is a . + + + + + + Get the object from the Cache + + + A cancellation token that can be used to cancel the work + + + + + + + + + A cancellation token that can be used to cancel the work + + + + Remove an item from the Cache. + + The Key of the Item in the Cache to remove. + A cancellation token that can be used to cancel the work + + + + + Clear the Cache + + A cancellation token that can be used to cancel the work + + + + + If this is a clustered cache, lock the item + + The Key of the Item in the Cache to lock. + A cancellation token that can be used to cancel the work + + + + + If this is a clustered cache, unlock the item + + The Key of the Item in the Cache to unlock. + A cancellation token that can be used to cancel the work + + + + + Get the object from the Cache + + + + + + + + + + + + + + Remove an item from the Cache. + + The Key of the Item in the Cache to remove. + + + + + Clear the Cache + + + + + + Clean up. + + + + + + If this is a clustered cache, lock the item + + The Key of the Item in the Cache to lock. + + + + + If this is a clustered cache, unlock the item + + The Key of the Item in the Cache to unlock. + + + + + Generate a timestamp + + + + + + Get a reasonable "lock timeout" + + + + + Gets the name of the cache region + + + + + Implementors manage transactional access to cached data. + + + + Transactions pass in a timestamp indicating transaction start time. + + + When used to cache entities and collections the key is the identifier of the + entity/collection and the value should be set to the + for an entity and the results of + for a collection. + + + + + + Attempt to retrieve an object from the Cache + + The key (id) of the object to get out of the Cache. + A timestamp prior to the transaction start time + A cancellation token that can be used to cancel the work + The cached object or + + + + + Attempt to cache an object, after loading from the database + + The key (id) of the object to put in the Cache. + The value + A timestamp prior to the transaction start time + the version number of the object we are putting + a Comparer to be used to compare version numbers + indicates that the cache should avoid a put if the item is already cached + A cancellation token that can be used to cancel the work + if the object was successfully cached + + + + + We are going to attempt to update/delete the keyed object + + The key + + A cancellation token that can be used to cancel the work + + This method is used by "asynchronous" concurrency strategies. + + + + Called after an item has become stale (before the transaction completes). + + + A cancellation token that can be used to cancel the work + + This method is used by "synchronous" concurrency strategies. + + + + Called after an item has been updated (before the transaction completes), + instead of calling Evict(). + + + + + + A cancellation token that can be used to cancel the work + This method is used by "synchronous" concurrency strategies. + + + + Called when we have finished the attempted update/delete (which may or + may not have been successful), after transaction completion. + + The key + The soft lock + A cancellation token that can be used to cancel the work + + This method is used by "asynchronous" concurrency strategies. + + + + Called after an item has been updated (after the transaction completes), + instead of calling Release(). + + + + + + A cancellation token that can be used to cancel the work + This method is used by "asynchronous" concurrency strategies. + + + + Called after an item has been inserted (after the transaction completes), instead of calling release(). + + + + + A cancellation token that can be used to cancel the work + This method is used by "asynchronous" concurrency strategies. + + + + Evict an item from the cache immediately (without regard for transaction isolation). + + + A cancellation token that can be used to cancel the work + + + + + Evict all items from the cache immediately. + + A cancellation token that can be used to cancel the work + + + + + Attempt to retrieve an object from the Cache + + The key (id) of the object to get out of the Cache. + A timestamp prior to the transaction start time + The cached object or + + + + + Attempt to cache an object, after loading from the database + + The key (id) of the object to put in the Cache. + The value + A timestamp prior to the transaction start time + the version number of the object we are putting + a Comparer to be used to compare version numbers + indicates that the cache should avoid a put if the item is already cached + if the object was successfully cached + + + + + We are going to attempt to update/delete the keyed object + + The key + + + This method is used by "asynchronous" concurrency strategies. + + + + Called after an item has become stale (before the transaction completes). + + + + This method is used by "synchronous" concurrency strategies. + + + + Called after an item has been updated (before the transaction completes), + instead of calling Evict(). + + + + + + This method is used by "synchronous" concurrency strategies. + + + + Called after an item has been inserted (before the transaction completes), instead of calling Evict(). + + + + + This method is used by "synchronous" concurrency strategies. + + + + Called when we have finished the attempted update/delete (which may or + may not have been successful), after transaction completion. + + The key + The soft lock + + This method is used by "asynchronous" concurrency strategies. + + + + Called after an item has been updated (after the transaction completes), + instead of calling Release(). + + + + + + This method is used by "asynchronous" concurrency strategies. + + + + Called after an item has been inserted (after the transaction completes), instead of calling release(). + + + + + This method is used by "asynchronous" concurrency strategies. + + + + Evict an item from the cache immediately (without regard for transaction isolation). + + + + + + + Evict all items from the cache immediately. + + + + + + Clean up all resources. + + + + + + Gets the cache region name. + + + + + Gets or sets the for this strategy to use. + + The for this strategy to use. + + + + Attempt to retrieve multiple objects from the Cache + + The cache concurrency strategy. + The keys (id) of the objects to get out of the Cache. + A timestamp prior to the transaction start time + A cancellation token that can be used to cancel the work + An array of cached objects or + + + + + Attempt to cache objects, after loading them from the database. + + The cache concurrency strategy. + The keys (id) of the objects to put in the Cache. + The objects to put in the cache. + A timestamp prior to the transaction start time. + The version numbers of the objects we are putting. + The comparers to be used to compare version numbers + Indicates that the cache should avoid a put if the item is already cached. + A cancellation token that can be used to cancel the work + if the objects were successfully cached. + + + + + Attempt to retrieve multiple objects from the Cache + + The cache concurrency strategy. + The keys (id) of the objects to get out of the Cache. + A timestamp prior to the transaction start time + An array of cached objects or + + + + + Attempt to cache objects, after loading them from the database. + + The cache concurrency strategy. + The keys (id) of the objects to put in the Cache. + The objects to put in the cache. + A timestamp prior to the transaction start time. + The version numbers of the objects we are putting. + The comparers to be used to compare version numbers + Indicates that the cache should avoid a put if the item is already cached. + if the objects were successfully cached. + + + + + Defines the contract for caches capable of storing query results. These + caches should only concern themselves with storing the matching result ids + of entities. + The transactional semantics are necessarily less strict than the semantics + of an item cache. + should also be implemented for + compatibility with future versions. + + + + + Clear the cache. + + A cancellation token that can be used to cancel the work + + + + The underlying . + + + + + The cache region. + + + + + Clear the cache. + + + + + Clean up all resources. + + + + + Transitional interface for . + + + + + Get query results from the cache. + + The query key. + The query parameters. + The query result row types. + The query spaces. + The session for which the query is executed. + A cancellation token that can be used to cancel the work + The query results, if cached. + + + + Put query results in the cache. + + The query key. + The query parameters. + The query result row types. + The query result. + The session for which the query was executed. + A cancellation token that can be used to cancel the work + if the result has been cached, + otherwise. + + + + Retrieve multiple query results from the cache. + + The query keys. + The array of query parameters matching . + The array of query result row types matching . + The array of query spaces matching . + The session for which the queries are executed. + A cancellation token that can be used to cancel the work + The cached query results, matching each key of respectively. For each + missed key, it will contain a . + + + + Attempt to cache objects, after loading them from the database. + + The query keys. + The array of query parameters matching . + The array of query result row types matching . + The array of query results matching . + The session for which the queries were executed. + A cancellation token that can be used to cancel the work + An array of boolean indicating if each query was successfully cached. + + + + + Get query results from the cache. + + The query key. + The query parameters. + The query result row types. + The query spaces. + The session for which the query is executed. + The query results, if cached. + + + + Put query results in the cache. + + The query key. + The query parameters. + The query result row types. + The query result. + The session for which the query was executed. + if the result has been cached, + otherwise. + + + + Retrieve multiple query results from the cache. + + The query keys. + The array of query parameters matching . + The array of query result row types matching . + The array of query spaces matching . + The session for which the queries are executed. + The cached query results, matching each key of respectively. For each + missed key, it will contain a . + + + + Attempt to cache objects, after loading them from the database. + + The query keys. + The array of query parameters matching . + The array of query result row types matching . + The array of query results matching . + The session for which the queries were executed. + An array of boolean indicating if each query was successfully cached. + + + + + Get query results from the cache. + + The cache. + The query key. + The query parameters. + The query result row types. + The query spaces. + The session for which the query is executed. + A cancellation token that can be used to cancel the work + The query results, if cached. + + + + Put query results in the cache. + + The cache. + The query key. + The query parameters. + The query result row types. + The query result. + The session for which the query was executed. + A cancellation token that can be used to cancel the work + if the result has been cached, + otherwise. + + + + Retrieve multiple query results from the cache. + + The cache. + The query keys. + The array of query parameters matching . + The array of query result row types matching . + The array of query spaces matching . + The session for which the queries are executed. + A cancellation token that can be used to cancel the work + The cached query results, matching each key of respectively. For each + missed key, it will contain a . + + + + Attempt to cache objects, after loading them from the database. + + The cache. + The query keys. + The array of query parameters matching . + The array of query result row types matching . + The array of query results matching . + The session for which the queries were executed. + A cancellation token that can be used to cancel the work + An array of boolean indicating if each query was successfully cached. + + + + + Get query results from the cache. + + The cache. + The query key. + The query parameters. + The query result row types. + The query spaces. + The session for which the query is executed. + The query results, if cached. + + + + Put query results in the cache. + + The cache. + The query key. + The query parameters. + The query result row types. + The query result. + The session for which the query was executed. + if the result has been cached, + otherwise. + + + + Retrieve multiple query results from the cache. + + The cache. + The query keys. + The array of query parameters matching . + The array of query result row types matching . + The array of query spaces matching . + The session for which the queries are executed. + The cached query results, matching each key of respectively. For each + missed key, it will contain a . + + + + Attempt to cache objects, after loading them from the database. + + The cache. + The query keys. + The array of query parameters matching . + The array of query result row types matching . + The array of query results matching . + The session for which the queries were executed. + An array of boolean indicating if each query was successfully cached. + + + + + Caches data that is sometimes updated without ever locking the cache. + If concurrent access to an item is possible, this concurrency strategy + makes no guarantee that the item returned from the cache is the latest + version available in the database. Configure your cache timeout accordingly! + This is an "asynchronous" concurrency strategy. + for a much stricter algorithm + + + + + Get the most recent version, if available. + + + + + Add multiple items to the cache + + + + + Add an item to the cache + + + + + Do nothing + + + + + Invalidate the item + + + + + Invalidate the item + + + + + Invalidate the item (again, for safety). + + + + + Invalidate the item (again, for safety). + + + + + Do nothing + + + + + Gets the cache region name. + + + + + Get the most recent version, if available. + + + + + Add multiple items to the cache + + + + + Add an item to the cache + + + + + Do nothing + + + + + Invalidate the item + + + + + Invalidate the item + + + + + Do nothing + + + + + Invalidate the item (again, for safety). + + + + + Invalidate the item (again, for safety). + + + + + Do nothing + + + + + Caches data that is never updated + + + + + Unsupported! + + + + + Unsupported! + + + + + Unsupported! + + + + + Do nothing. + + + + + Do nothing. + + + + + Unsupported! + + + + + Gets the cache region name. + + + + + Unsupported! + + + + + Unsupported! + + + + + Unsupported! + + + + + Do nothing. + + + + + Do nothing. + + + + + Do nothing. + + + + + Unsupported! + + + + + Caches data that is sometimes updated while maintaining the semantics of + "read committed" isolation level. If the database is set to "repeatable + read", this concurrency strategy almost maintains the semantics. + Repeatable read isolation is compromised in the case of concurrent writes. + This is an "asynchronous" concurrency strategy. + + + If this strategy is used in a cluster, the underlying cache implementation + must support distributed hard locks (which are held only momentarily). This + strategy also assumes that the underlying cache implementation does not do + asynchronous replication and that state has been fully replicated as soon + as the lock is released. + for a faster algorithm + + + + + + Do not return an item whose timestamp is later than the current + transaction timestamp. (Otherwise we might compromise repeatable + read unnecessarily.) Do not return an item which is soft-locked. + Always go straight to the database instead. + + + Note that since reading an item from that cache does not actually + go to the database, it is possible to see a kind of phantom read + due to the underlying row being updated after we have read it + from the cache. This would not be possible in a lock-based + implementation of repeatable read isolation. It is also possible + to overwrite changes made and committed by another transaction + after the current transaction read the item from the cache. This + problem would be caught by the update-time version-checking, if + the data is versioned or timestamped. + + + + + Stop any other transactions reading or writing this item to/from + the cache. Send them straight to the database instead. (The lock + does time out eventually.) This implementation tracks concurrent + locks by transactions which simultaneously attempt to write to an + item. + + + + + Do not add an item to the cache unless the current transaction + timestamp is later than the timestamp at which the item was + invalidated. (Otherwise, a stale item might be re-added if the + database is operating in repeatable read isolation mode.) + + Whether the items were actually put into the cache + + + + Do not add an item to the cache unless the current transaction + timestamp is later than the timestamp at which the item was + invalidated. (Otherwise, a stale item might be re-added if the + database is operating in repeatable read isolation mode.) + + Whether the item was actually put into the cache + + + + decrement a lock and put it back in the cache + + + + + Re-cache the updated state, if and only if there there are + no other concurrent soft locks. Release our lock. + + + + + Gets the cache region name. + + + + + Generate an id for a new lock. Uniqueness per cache instance is very + desirable but not absolutely critical. Must be called from one of the + synchronized methods of this class. + + + + + + Do not return an item whose timestamp is later than the current + transaction timestamp. (Otherwise we might compromise repeatable + read unnecessarily.) Do not return an item which is soft-locked. + Always go straight to the database instead. + + + Note that since reading an item from that cache does not actually + go to the database, it is possible to see a kind of phantom read + due to the underlying row being updated after we have read it + from the cache. This would not be possible in a lock-based + implementation of repeatable read isolation. It is also possible + to overwrite changes made and committed by another transaction + after the current transaction read the item from the cache. This + problem would be caught by the update-time version-checking, if + the data is versioned or timestamped. + + + + + Stop any other transactions reading or writing this item to/from + the cache. Send them straight to the database instead. (The lock + does time out eventually.) This implementation tracks concurrent + locks by transactions which simultaneously attempt to write to an + item. + + + + + Do not add an item to the cache unless the current transaction + timestamp is later than the timestamp at which the item was + invalidated. (Otherwise, a stale item might be re-added if the + database is operating in repeatable read isolation mode.) + + Whether the items were actually put into the cache + + + + Do not add an item to the cache unless the current transaction + timestamp is later than the timestamp at which the item was + invalidated. (Otherwise, a stale item might be re-added if the + database is operating in repeatable read isolation mode.) + + Whether the item was actually put into the cache + + + + decrement a lock and put it back in the cache + + + + + Re-cache the updated state, if and only if there there are + no other concurrent soft locks. Release our lock. + + + + + Is the client's lock commensurate with the item in the cache? + If it is not, we know that the cache expired the original + lock. + + + + + The standard implementation of the Hibernate + interface. This implementation is very good at recognizing stale query + results and re-running queries when it detects this condition, recaching + the new results. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Tracks the timestamps of the most recent updates to particular tables. It is + important that the cache timeout of the underlying cache implementation be set + to a higher value than the timeouts of any of the query caches. In fact, we + recommend that the the underlying cache not be configured for expiry at all. + Note, in particular, that an LRU cache expiry policy is never appropriate. + + + + + Marker interface, denoting a client-visible "soft lock" on a cached item. + + + + + An item of cached data, timestamped with the time it was cached, when it was locked, + when it was unlocked + + + + + The timestamp on the cached data + + + + + The actual cached data + + + + + The version of the cached data + + + + + Lock the item + + + + + Not a lock! + + + + + Is this item visible to the timestamped transaction? + + + + + + + Don't overwrite already cached items + + + + + + + + + Represents any exception from an . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Factory class for creating an . + + + + + No providers implement transactional caching currently, + it was ported from Hibernate just for the sake of completeness. + + + + + Creates an from the parameters. + + The name of the strategy that should use for the class. + The name of the class the strategy is being created for. + if the object being stored in the cache is mutable. + Used to retrieve the global cache region prefix. + Properties the cache provider can use to configure the cache. + An to use for this object in the . + + + + Allows multiple entity classes / collection roles to be + stored in the same cache region. Also allows for composite + keys which do not properly implement equals()/hashCode(). + + + + + Construct a new key for a collection or entity instance. + Note that an entity name should always be the root entity + name, not a subclass entity name. + + The identifier associated with the cached data + The Hibernate type mapping + The entity or collection-role name. + The session factory for which we are caching + + + + + + + A soft lock which supports concurrent locking, + timestamped with the time it was released + + + This class was named Lock in H2.1 + + + + + Increment the lock, setting the + new lock timeout + + + + + Decrement the lock, setting the unlock + timestamp if now unlocked + + + + + + Can the timestamped transaction re-cache this + locked item now? + + + + + Was this lock held concurrently by multiple + transactions? + + + + + Yes, this is a lock + + + + + locks are not returned to the client! + + + + + The data used to put a value to the 2nd level cache. + + + + + Cache Provider plugin for NHibernate that is configured by using + cache.provider_class="NHibernate.Cache.HashtableCacheProvider" + + + + + Support for pluggable caches + + + + + Build a cache. + + The name of the cache region. + Configuration settings. + A cache. + + + + generate a timestamp + + + + + + Callback to perform any necessary initialization of the underlying cache implementation + during ISessionFactory construction. + + current configuration settings + + + + Callback to perform any necessary cleanup of the underlying cache implementation + during . + + + + + Contract for sources of optimistically lockable data sent to the second level cache. + + + Note currently EntityPersisters are + the only viable source. + + + + + Does this source represent versioned (i.e., and thus optimistically lockable) data? + + True if this source represents versioned data; false otherwise. + + + Get the comparator used to compare two different version values together. + An appropriate comparator. + + + + Defines a factory for query cache instances. These factories are responsible for + creating individual QueryCache instances. + + + + + A cache provider placeholder used when caching is disabled. + + + + + Configure the cache + + the name of the cache region + configuration settings + + + + + Generate a timestamp + + + + + Callback to perform any necessary initialization of the underlying cache implementation during SessionFactory + construction. + + current configuration settings. + + + + Callback to perform any necessary cleanup of the underlying cache implementation during SessionFactory.close(). + + + + + Initializes a new instance of the class. + + the session factory for this query key, required to get the identifiers of entities that are used as values. + The query string. + The query parameters. + The filters. + The result transformer; should be null if data is not transformed before being cached. + + + + + + + Standard Hibernate implementation of the IQueryCacheFactory interface. Returns + instances of . + + + + + Generates increasing identifiers (in a single application domain only). + + + Not valid across multiple application domains. Identifiers are not necessarily + strictly increasing, but usually are. + + + + + + + + + + + + + + Base class for implementing . + + + + + Initialize the collection, if possible, wrapping any exceptions + in a runtime exception + + currently obsolete + A cancellation token that can be used to cancel the work + if we cannot initialize + + + + To be called internally by the session, forcing + immediate initialization. + + A cancellation token that can be used to cancel the work + + This method is similar to , except that different exceptions are thrown. + + + + + Called before inserting rows, to ensure that any surrogate keys are fully generated + + + A cancellation token that can be used to cancel the work + + + + Get all "orphaned" elements + + + + + Given a collection of entity instances that used to + belong to the collection, and a collection of instances + that currently belong, return a collection of orphans + + + + + Disassemble the collection, ready for the cache + + + A cancellation token that can be used to cancel the work + + + + + Get all the elements that need deleting + + + + + Read the state of the collection from a disassembled cached value. + + + + + A cancellation token that can be used to cancel the work + + + + Do we need to update this element? + + + + + A cancellation token that can be used to cancel the work + + + + + Reads the row from the . + + The DbDataReader that contains the value of the Identifier + The persister for this Collection. + The descriptor providing result set column names + The owner of this Collection. + A cancellation token that can be used to cancel the work + The object that was contained in the row. + + + + Do we need to insert this element? + + + + + A cancellation token that can be used to cancel the work + + + + + Not called by Hibernate, but used by non-NET serialization, eg. SOAP libraries. + + + + + Is the collection currently connected to an open session? + + + + + Is this collection in a state that would allow us to "queue" additions? + + + + Is this collection in a state that would allow us to + "queue" puts? This is a special case, because of orphan + delete. + + + + Is this collection in a state that would allow us to + "queue" clear? This is a special case, because of orphan + delete. + + + + Is this the "inverse" end of a bidirectional association? + + + + Is this the "inverse" end of a bidirectional association with + no orphan delete enabled? + + + + + Is this the "inverse" end of a bidirectional one-to-many, or + of a collection with no orphan delete? + + + + + Return the user-visible collection (or array) instance + + + By default, the NHibernate wrapper is an acceptable collection for + the end user code to work with because it is interface compatible. + An NHibernate PersistentList is an IList, an NHibernate PersistentMap is an IDictionary + and those are the types user code is expecting. + + + + + + + + Is the initialized collection empty? + + + + + Called by any read-only method of the collection interface + + + + Called by the Count property + + + + Called by any writer method of the collection interface + + + + + Queue an addition, delete etc. if the persistent collection supports it + + + + + After reading all existing elements from the database, + add the queued elements to the underlying collection. + + + + + After reading all existing elements from the database, do the queued operations + (adds or removes) on the underlying collection. + + + + + Clears out any Queued operation. + + + After flushing, clear any "queued" additions, since the + database state is now synchronized with the memory state. + + + + + Called just before reading any rows from the + + + + + Called after reading all rows from the + + + This should be overridden by sub collections that use temporary collections + to store values read from the db. + + + + + Initialize the collection, if possible, wrapping any exceptions + in a runtime exception + + currently obsolete + if we cannot initialize + + + + Mark the collection as initialized. + + + + + Gets a indicating if the underlying collection is directly + accessible through code. + + + if we are not guaranteed that the NHibernate collection wrapper + is being used. + + + This is typically whenever a transient object that contains a collection is being + associated with an through or . + NHibernate can't guarantee that it will know about all operations that would cause NHibernate's collections + to call or . + + + + + Disassociate this collection from the given session. + + + true if this was currently associated with the given session + + + + Associate the collection with the given session. + + + false if the collection was already associated with the session + + + + Gets a indicating if the rows for this collection + need to be recreated in the table. + + The for this Collection. + + by default since most collections can determine which rows need to be + individually updated/inserted/deleted. Currently only 's for many-to-many + need to be recreated. + + + + + To be called internally by the session, forcing + immediate initialization. + + + This method is similar to , except that different exceptions are thrown. + + + + + Gets the Snapshot from the current session the collection is in. + + + + Is this instance initialized? + + + Does this instance have any "queued" additions? + + + + + + + Called before inserting rows, to ensure that any surrogate keys are fully generated + + + + + + Called after inserting a row, to fetch the natively generated id + + + + + Get all "orphaned" elements + + + + + Given a collection of entity instances that used to + belong to the collection, and a collection of instances + that currently belong, return a collection of orphans + + + + + Disassemble the collection, ready for the cache + + + + + + + Is this the wrapper for the given underlying collection instance? + + + + + + + Does an element exist at this entry in the collection? + + + + + + + + Get all the elements that need deleting + + + + + Read the state of the collection from a disassembled cached value. + + + + + + + + Do we need to update this element? + + + + + + + + + Reads the row from the . + + The DbDataReader that contains the value of the Identifier + The persister for this Collection. + The descriptor providing result set column names + The owner of this Collection. + The object that was contained in the row. + + + + Do we need to insert this element? + + + + + + + + + Get the index of the given collection entry + + + + + Called before any elements are read into the collection, + allowing appropriate initializations to occur. + + The underlying collection persister. + The anticipated size of the collection after initialization is complete. + + + + An unordered, unkeyed collection that can contain the same element + multiple times. The .NET collections API, has no Bag. + Most developers seem to use to represent bag semantics, + so NHibernate follows this practice. + + The type of the element the bag should hold. + The underlying collection used is an + + + + Initializes this PersistentBag from the cached values. + + The CollectionPersister to use to reassemble the PersistentBag. + The disassembled PersistentBag. + The owner object. + A cancellation token that can be used to cancel the work + + + + Initializes this PersistentBag from the cached values. + + The CollectionPersister to use to reassemble the PersistentBag. + The disassembled PersistentBag. + The owner object. + + + + Gets a indicating if this PersistentBag needs to be recreated + in the database. + + + + if this is a one-to-many Bag, if this is not + a one-to-many Bag. Since a Bag is an unordered, unindexed collection + that permits duplicates it is not possible to determine what has changed in a + many-to-many so it is just recreated. + + + + + Counts the number of times that the occurs + in the . + + The element to find in the list. + The to search. + The that can determine equality. + + The number of occurrences of the element in the list. + + + + + Implements "bag" semantics more efficiently than by adding + a synthetic identifier column to the table. + + + + The identifier is unique for all rows in the table, allowing very efficient + updates and deletes. The value of the identifier is never exposed to the + application. + + + Identifier bags may not be used for a many-to-one association. Furthermore, + there is no reason to use inverse="true". + + + + + + Initializes this Bag from the cached values. + + The CollectionPersister to use to reassemble the PersistentIdentifierBag. + The disassembled PersistentIdentifierBag. + The owner object. + A cancellation token that can be used to cancel the work + + + + Initializes this Bag from the cached values. + + The CollectionPersister to use to reassemble the PersistentIdentifierBag. + The disassembled PersistentIdentifierBag. + The owner object. + + + + A persistent wrapper for an + + The type of the element the list should hold. + The underlying collection used is a + + + + Initializes this PersistentGenericList from the cached values. + + The CollectionPersister to use to reassemble the PersistentGenericList. + The disassembled PersistentList. + The owner object. + A cancellation token that can be used to cancel the work + + + + Initializes an instance of the + in the . + + The the list is in. + + + + Initializes an instance of the + that wraps an existing in the . + + The the list is in. + The to wrap. + + + + Initializes this PersistentGenericList from the cached values. + + The CollectionPersister to use to reassemble the PersistentGenericList. + The disassembled PersistentList. + The owner object. + + + + A persistent wrapper for a . Underlying + collection is a + + The type of the keys in the IDictionary. + The type of the elements in the IDictionary. + + + + Initializes this PersistentGenericMap from the cached values. + + The CollectionPersister to use to reassemble the PersistentGenericMap. + The disassembled PersistentGenericMap. + The owner object. + A cancellation token that can be used to cancel the work + + + + Construct an uninitialized PersistentGenericMap. + + The ISession the PersistentGenericMap should be a part of. + + + + Construct an initialized PersistentGenericMap based off the values from the existing IDictionary. + + The ISession the PersistentGenericMap should be a part of. + The IDictionary that contains the initial values. + + + + Initializes this PersistentGenericMap from the cached values. + + The CollectionPersister to use to reassemble the PersistentGenericMap. + The disassembled PersistentGenericMap. + The owner object. + + + + A persistent wrapper for an . + + + + + Initializes this PersistentSet from the cached values. + + The CollectionPersister to use to reassemble the PersistentSet. + The disassembled PersistentSet. + The owner object. + A cancellation token that can be used to cancel the work + + + + The that NHibernate is wrapping. + + + + + A temporary list that holds the objects while the PersistentSet is being + populated from the database. + + + This is necessary to ensure that the object being added to the PersistentSet doesn't + have its' GetHashCode() and Equals() methods called during the load + process. + + + + + Constructor matching super. + Instantiates a lazy set (the underlying set is un-initialized). + + The session to which this set will belong. + + + + Instantiates a non-lazy set (the underlying set is constructed + from the incoming set reference). + + The session to which this set will belong. + The underlying set data. + + + + Initializes this PersistentSet from the cached values. + + The CollectionPersister to use to reassemble the PersistentSet. + The disassembled PersistentSet. + The owner object. + + + + Set up the temporary List that will be used in the EndRead() + to fully create the set. + + + + + Takes the contents stored in the temporary list created during BeginRead() + that was populated during ReadFrom() and write it to the underlying + PersistentSet. + + + + + This interface allows to check if a lazy collection is already initialized and to force its initialization. + + + This interface is provided to allow implementing lazy initialized collections which do not implement + . + That is e.g. needed for NHibernate.Envers which can't load its collections as PersistentCollections. + + + + + Force immediate initialization. + + A cancellation token that can be used to cancel the work + + + + Return if the proxy has already been initialized. + If , accessing the collection or calling + initializes the collection. + + + + + Force immediate initialization. + + + + + + Persistent collections are treated as value objects by NHibernate. + ie. they have no independent existence beyond the object holding + a reference to them. Unlike instances of entity classes, they are + automatically deleted when unreferenced and automatically become + persistent when held by a persistent object. Collections can be + passed between different objects (change "roles") and this might + cause their elements to move from one database table to another. + + + NHibernate "wraps" a collection in an instance of + . This mechanism is designed + to support tracking of changes to the collection's persistent + state and lazy instantiation of collection elements. The downside + is that only certain abstract collection types are supported and + any extra semantics are lost. + + + Applications should never use classes in this namespace + directly, unless extending the "framework" here. + + + Changes to structure of the collection are recorded by the + collection calling back to the session. Changes to mutable + elements (ie. composite elements) are discovered by cloning their + state when the collection is initialized and comparing at flush + time. + + + + + + Read the state of the collection from a disassembled cached value. + + + + + A cancellation token that can be used to cancel the work + + + + Reads the row from the . + + + This method should be prepared to handle duplicate elements caused by fetching multiple collections. + + The DbDataReader that contains the value of the Identifier + The persister for this Collection. + The descriptor providing result set column names + The owner of this Collection. + A cancellation token that can be used to cancel the work + The object that was contained in the row. + + + + Does the current state exactly match the snapshot? + + The to compare the elements of the Collection. + A cancellation token that can be used to cancel the work + + if the wrapped collection is different than the snapshot + of the collection or if one of the elements in the collection is + dirty. + + + + + Disassemble the collection, ready for the cache + + The for this Collection. + A cancellation token that can be used to cancel the work + The contents of the persistent collection in a cacheable form. + + + + To be called internally by the session, forcing + immediate initalization. + + A cancellation token that can be used to cancel the work + + This method is similar to , except that different exceptions are thrown. + + + + + Do we need to insert this element? + + + + + Do we need to update this element? + + + + + Get all the elements that need deleting + + + + Get the "queued" orphans + + + + Called before inserting rows, to ensure that any surrogate keys are fully generated + + + A cancellation token that can be used to cancel the work + + + + Get all "orphaned" elements + + The snapshot of the collection. + The persistent class whose objects + the collection is expected to contain. + A cancellation token that can be used to cancel the work + + An that contains all of the elements + that have been orphaned. + + + + + The owning entity. + + + Note that the owner is only set during the flush + cycle, and when a new collection wrapper is created + while loading an entity. + + + + + Return the user-visible collection (or array) instance + + + By default, the NHibernate wrapper is an acceptable collection for + the end user code to work with because it is interface compatible. + An NHibernate PersistentList is an IList, an NHibernate PersistentMap is an IDictionary + and those are the types user code is expecting. + + + + Get the current collection key value + + + Get the current role name + + + Is the collection unreferenced? + + + + Is the collection dirty? Note that this is only + reliable during the flush cycle, after the + collection elements are dirty checked against + the snapshot. + + + + Get the snapshot cached by the collection instance + + + + Is the initialized collection empty? + + + + After flushing, re-init snapshot state. + + + + Clears out any Queued Additions. + + + After a Flush() the database is in sync with the in-memory + contents of the Collection. Since everything is in sync remove + any Queued Additions. + + + + + Called just before reading any rows from the + + + + + Called after reading all rows from the + + + This should be overridden by sub collections that use temporary collections + to store values read from the db. + + + true if NOT has Queued operations + + + + + Called after initializing from cache + + + true if NOT has Queued operations + + + + + Gets a indicating if the underlying collection is directly + accessible through code. + + + if we are not guaranteed that the NHibernate collection wrapper + is being used. + + + This is typically whenever a transient object that contains a collection is being + associated with an through or . + NHibernate can't guarantee that it will know about all operations that would cause NHibernate's collections + to call or . + + + + + Disassociate this collection from the given session. + + + true if this was currently associated with the given session + + + + Associate the collection with the given session. + + + false if the collection was already associated with the session + + + + Read the state of the collection from a disassembled cached value. + + + + + + + + Iterate all collection entries, during update of the database + + + An that gives access to all entries + in the collection. + + + + + Reads the row from the . + + + This method should be prepared to handle duplicate elements caused by fetching multiple collections. + + The DbDataReader that contains the value of the Identifier + The persister for this Collection. + The descriptor providing result set column names + The owner of this Collection. + The object that was contained in the row. + + + + Get the identifier of the given collection entry + + + + + Get the index of the given collection entry + + + + + Get the value of the given collection entry + + + + + Get the snapshot value of the given collection entry + + + + + Called before any elements are read into the collection, + allowing appropriate initializations to occur. + + The for this persistent collection. + The anticipated size of the collection after initilization is complete. + + + + Does the current state exactly match the snapshot? + + The to compare the elements of the Collection. + + if the wrapped collection is different than the snapshot + of the collection or if one of the elements in the collection is + dirty. + + + + Is the snapshot empty? + + + + Disassemble the collection, ready for the cache + + The for this Collection. + The contents of the persistent collection in a cacheable form. + + + + Gets a indicating if the rows for this collection + need to be recreated in the table. + + The for this Collection. + + by default since most collections can determine which rows need to be + individually updated/inserted/deleted. Currently only 's for many-to-many + need to be recreated. + + + + + Return a new snapshot of the current state of the collection + + + + + To be called internally by the session, forcing + immediate initalization. + + + This method is similar to , except that different exceptions are thrown. + + + + + Does an element exist at this entry in the collection? + + + + + Do we need to insert this element? + + + + + Do we need to update this element? + + + + + Get all the elements that need deleting + + + + + Is this the wrapper for the given underlying collection instance? + + The collection to see if this IPersistentCollection is wrapping. + + if the IPersistentCollection is wrappping the collection instance, + otherwise. + + + + + + + + + + + + + Get the "queued" orphans + + + + Clear the dirty flag, after flushing changes + to the database. + + + + + Mark the collection as dirty + + + + + Called before inserting rows, to ensure that any surrogate keys are fully generated + + + + + + Called after inserting a row, to fetch the natively generated id + + + + + Get all "orphaned" elements + + The snapshot of the collection. + The persistent class whose objects + the collection is expected to contain. + + An that contains all of the elements + that have been orphaned. + + + + + A persistent wrapper for an array. lazy initialization is NOT supported + + Use of Hibernate arrays is not really recommended. + + + + Initializes this array holder from the cached values. + + The CollectionPersister to use to reassemble the Array. + The disassembled Array. + The owner object. + A cancellation token that can be used to cancel the work + + + + A temporary list that holds the objects while the PersistentArrayHolder is being + populated from the database. + + + + + Gets or sets the array. + + The array. + + + + Returns the user-visible portion of the NHibernate PersistentArrayHolder. + + + The array that contains the data, not the NHibernate wrapper. + + + + + Before is called the PersistentArrayHolder needs to setup + a temporary list to hold the objects. + + + + + Takes the contents stored in the temporary list created during + that was populated during and write it to the underlying + array. + + + + + Initializes this array holder from the cached values. + + The CollectionPersister to use to reassemble the Array. + The disassembled Array. + The owner object. + + + + After reading all existing elements from the database, do the queued operations + (adds or removes) on the underlying collection. + + The collection. + + + + The base class for the ConnectionProvider. + + + + + Get an open . + + A cancellation token that can be used to cancel the work + An open . + + + + Closes the . + + The to clean up. + + + + Configures the ConnectionProvider with the Driver and the ConnectionString. + + An that contains the settings for this ConnectionProvider. + + Thrown when a could not be found + in the settings parameter or the Driver Class could not be loaded. + + + + + Get the .NET 2.0 named connection string + + + Thrown when a was found + in the settings parameter but could not be found in the app.config + + + + + Configures the driver for the ConnectionProvider. + + An that contains the settings for the Driver. + + Thrown when the could not be + found in the settings parameter or there is a problem with creating + the . + + + + + Gets the for the + to connect to the database. + + + The for the + to connect to the database. + + + + + Gets the that can create the object. + + + The that can create the . + + + + + Get an open . + + An open . + + + + A flag to indicate if Disose() has been called. + + + + + Finalizer that ensures the object is correctly disposed of. + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + Indicates if this ConnectionProvider is being Disposed of or Finalized. + +

+ If this ConnectionProvider is being Finalized (isDisposing==false) then make + sure not to call any methods that could potentially bring this + ConnectionProvider back to life. +

+

+ If any subclasses manage resources that also need to be disposed of this method + should be overridden, but don't forget to call it in the override. +

+
+
+ + + A ConnectionProvider that uses an IDriver to create connections. + + + + + Gets a new open through + the . + + A cancellation token that can be used to cancel the work + + An Open . + + + If there is any problem creating or opening the . + + + + + Closes and Disposes of the . + + The to clean up. + + + + Gets a new open through + the . + + + An Open . + + + If there is any problem creating or opening the . + + + + + A strategy for obtaining ADO.NET . + + + The IConnectionProvider interface is not intended to be exposed to the application. + Instead it is used internally by NHibernate to obtain . + Implementors should provide a public default constructor. + + + + + Get an open . + + A cancellation token that can be used to cancel the work + An open . + + + + Initialize the connection provider from the given properties. + + The connection provider settings + + + + Dispose of a used + + The to clean up. + + + + Gets the this ConnectionProvider should use to + communicate with the .NET Data Provider + + + The to communicate with the .NET Data Provider. + + + + + Get an open . + + An open . + + + + An implementation of the IConnectionProvider that simply throws an exception when + a connection is requested. + + + This implementation indicates that the user is expected to supply an ADO.NET connection + + + + + Throws an if this method is called + because the user is responsible for creating s. + + A cancellation token that can be used to cancel the work + + No value is returned because an is thrown. + + + Thrown when this method is called. User is responsible for creating + s. + + + + + Throws an if this method is called + because the user is responsible for closing s. + + The to clean up. + + Thrown when this method is called. User is responsible for closing + s. + + + + + Throws an if this method is called + because the user is responsible for creating s. + + + No value is returned because an is thrown. + + + Thrown when this method is called. User is responsible for creating + s. + + + + + Configures the ConnectionProvider with only the Driver class. + + + + All other settings of the Connection are the responsibility of the User since they configured + NHibernate to use a Connection supplied by the User. + + + + + Instantiates a connection provider given configuration properties. + + + + + + A impl which scopes the notion of current + session by the current thread of execution. Threads do not give us a + nice hook to perform any type of cleanup making + it questionable for this impl to actually generate Session instances. In + the interest of usability, it was decided to have this default impl + actually generate a session upon first request and then clean it up + after the associated with that session + is committed/rolled-back. In order for ensuring that happens, the sessions + generated here are unusable until after {@link Session#beginTransaction()} + has been called. If Close() is called on a session managed by + this class, it will be automatically unbound. + + + Additionally, the static and methods are + provided to allow application code to explicitly control opening and + closing of these sessions. This, with some from of interception, + is the preferred approach. It also allows easy framework integration + and one possible approach for implementing long-sessions. + + The cleanup on transaction end is indeed not implemented. + + + + + Unassociate a previously bound session from the current thread of execution. + + + + + + + Not currently implemented. + + + + + + Provides a current session + for current asynchronous flow. + + + + + Provides a current session + for each . + Uses instead if run under .NET Core/.NET Standard. + + Not recommended for .NET 2.0 web applications. + + + + + + The key is the session factory and the value is the bound session. + + + + + The key is the session factory and the value is the bound session. + + + + + Extends the contract defined by + by providing methods to bind and unbind sessions to the current context. + + + The notion of a contextual session is managed by some external entity + (generally some form of interceptor like the HttpModule). + This external manager is responsible for scoping these contextual sessions + appropriately binding/unbinding them here for exposure to the application + through calls. + + + + Gets or sets the currently bound session. + + + + Retrieve the current session according to the scoping defined + by this implementation. + + The current session. + Indicates an issue + locating the current session. + + + + Binds the specified session to the current context. + + + + + Returns whether there is a session bound to the current context. + + + + + Unbinds and returns the current session. + + + + + Defines the contract for implementations which know how to + scope the notion of a current session. + + + + Implementations should adhere to the following: + + contain a constructor accepting a single argument of type + , or implement + + should be thread safe + should be fully serializable + + + + Implementors should be aware that they are also fully responsible for + cleanup of any generated current-sessions. + + + Note that there will be exactly one instance of the configured + ICurrentSessionContext implementation per . + + + It is recommended to inherit from the class + whenever possible as it simplifies the implementation and provides + single entry point with session binding support. + + + + + + Retrieve the current session according to the scoping defined + by this implementation. + + The current session. + Typically indicates an issue + locating or creating the current session. + + + + An allowing to set its session factory. Implementing + this interface allows the to be used for instantiating the + session context. + + + + + Sets the factory. This method should be called once after creating the context. + + The factory. + + + + Gets or sets the currently bound session. + + + + + Get the dictionary mapping session factory to its current session. Yield null if none have been set. + + + + + Set the map mapping session factory to its current session. + + + + + This class allows access to the HttpContext without referring to HttpContext at compile time. + The accessors are cached as delegates for performance. + + + + + Provides a current session + for each thread using the []. + + + + + Provides a current session + for the current OperationContext in WCF. Works only during the lifetime of a WCF operation. + + + + + Provides a current session + for each System.Web.HttpContext. Works only with web applications. + + + + + Get an executable instance of IQueryOver<TRoot>, + to actually run the query. + + + + Get an executable instance of IQueryOver<TRoot>, + to actually run the query. + + + + Clones the QueryOver, clears the orders and paging, and projects the RowCount + + + + + + Clones the QueryOver, clears the orders and paging, and projects the RowCount (Int64) + + + + + + Creates an exact clone of the QueryOver + + + + + Method to allow comparison of detached query in Lambda expression + e.g., p => p.Name == myQuery.As<string> + + type returned (projected) by query + throws an exception if evaluated directly at runtime. + + + + Base class for implementations. + + + + + Gets a string representation of the . + + + A String that shows the contents of the . + + + This is not a well formed Sql fragment. It is useful for logging what the + looks like. + + + + + Render a SqlString for the expression. + + A SqlString that contains a valid Sql fragment. + + + + Return typed values for all parameters in the rendered SQL fragment + + An array of TypedValues for the Expression. + + + + Return all projections used in this criterion + + An array of IProjection used by the Expression. + + + + See here for details: + http://steve.emxsoftware.com/NET/Overloading+the++and++operators + + + + + See here for details: + http://steve.emxsoftware.com/NET/Overloading+the++and++operators + + + + + An Aggregation + + + + + Gets the typed values for parameters in this projection + + The criteria. + The criteria query. + + + + + An that combines two s + with an and between them. + + + + + Get the Sql operator to put between the two s. + + The string "and" + + + + Initializes a new instance of the class + that combines two . + + The to use as the left hand side. + The to use as the right hand side. + + + + An that represents a "between" constraint. + + + + + Initializes a new instance of the class. + + The _projection. + The _lo. + The _hi. + + + + Initialize a new instance of the class for + the named Property. + + The name of the Property of the Class. + The low value for the BetweenExpression. + The high value for the BetweenExpression. + + + + Casting a value from one type to another, at the database + level + + + + + An that Junctions together multiple + s with an and + + + + + Get the Sql operator to put between multiple s. + + The string " and " + + + + This is useful if we want to send a value to the database + + + + + A Count + + + + The alias that refers to the "root" entity of the criteria query. + + + Each row of results is a from alias to entity instance + + + Each row of results is an instance of the root entity + + + Each row of results is a distinct instance of the root entity + + + This result transformer is selected implicitly by calling + + + Specifies joining to an entity based on an inner join. + + + Specifies joining to an entity based on a full join. + + + Specifies joining to an entity based on a left outer join. + + + + Some applications need to create criteria queries in "detached + mode", where the Hibernate session is not available. This class + may be instantiated anywhere, and then a ICriteria + may be obtained by passing a session to + GetExecutableCriteria(). All methods have the + same semantics and behavior as the corresponding methods of the + ICriteria interface. + + + + + Get an executable instance of Criteria, + to actually run the query. + + + + Get an executable instance of Criteria, + to actually run the query. + + + + Gets the root entity type if available, throws otherwise + + + This is an NHibernate specific method, used by several dependent + frameworks for advance integration with NHibernate. + + + + + Clear all orders from criteria. + + + + + An that Junctions together multiple + s with an or + + + + + Get the Sql operator to put between multiple s. + + The string " or " + + + + Gets the typed values for parameters in this projection + + The criteria. + The criteria query. + + + + + Entity projection + + + + + Root entity projection + + + + + Entity projection for given type and alias + + Type of entity + Entity alias + + + + Fetch lazy properties + + + + + Lazy load entity + + + + + Lazy load entity + + + + + Fetch lazy properties + + + + + An that represents an "equal" constraint + between two properties. + + + + + Initializes a new instance of the class. + + Name of the LHS property. + The RHS projection. + + + + Initializes a new instance of the class. + + The LHS projection. + The RHS projection. + + + + Initializes a new instance of the class. + + The projection. + Name of the RHS property. + + + + Initializes a new instance of the class + that compares two mapped properties using an "equal" constraint. + + The name of the Property to use as the left hand side. + The name of the Property to use as the right hand side. + + + + Get the Sql operator to use for the . + + The string " = " + + + + Support for Query By Example. + + + + List results = session.CreateCriteria(typeof(Parent)) + .Add( Example.Create(parent).IgnoreCase() ) + .CreateCriteria("child") + .Add( Example.Create( parent.Child ) ) + .List(); + + + + "Examples" may be mixed and matched with "Expressions" in the same + + + + + + A strategy for choosing property values for inclusion in the query criteria + + + + + Determine if the Property should be included. + + The value of the property that is being checked for inclusion. + The name of the property that is being checked for inclusion. + The of the property. + + if the Property should be included in the Query, + otherwise. + + + + + Implementation of that includes all + properties regardless of value. + + + + + Implementation of that includes the + properties that are not and do not have an + returned by propertyValue.ToString(). + + + This selector is not present in H2.1. It may be useful if nullable types + are used for some properties. + + + + Set escape character for "like" clause + + + + Set the for this . + + The to determine which properties to include. + This instance. + + This should be used when a custom has + been implemented. Otherwise use the methods + or to set the + to the s built into NHibernate. + + + + + Set the for this + to exclude zero-valued properties. + + + + + Set the for this + to exclude no properties. + + + + + Use the "like" operator for all string-valued properties with + the specified . + + + The to convert the string to the pattern + for the like comparison. + + + + + Use the "like" operator for all string-valued properties. + + + The default is MatchMode.Exact. + + + + + Exclude a particular named property + + The name of the property to exclude. + + + + Create a new instance, which includes all non-null properties + by default + + + A new instance of . + + + + Initialize a new instance of the class for a particular + entity. + + The that the Example is being built from. + The the Example should use. + + + + Determines if the property should be included in the Query. + + The value of the property. + The name of the property. + The of the property. + + if the Property should be included, if + the Property should not be a part of the Query. + + + + + Adds a based on the value + and type parameters to the in the + list parameter. + + The value of the Property. + The of the Property. + The to add the to. + + This method will add objects to the list parameter. + + + + + This class is semi-deprecated. Use . + + + + + + Apply a constraint expressed in SQL, with the given SQL parameters + + + + + + + + + Apply a constraint expressed in SQL, with the given SQL parameter + + + + + + + + + Apply a constraint expressed in SQL, with the given SQL parameter + + + + + Apply a constraint expressed in SQL + + + + + + + Apply a constraint expressed in SQL + + + + + + + An that represents an "greater than or equal" constraint + between two properties. + + + + + Initializes a new instance of the class. + + Name of the LHS property. + The RHS projection. + + + + Initializes a new instance of the class. + + The LHS projection. + The RHS projection. + + + + Initializes a new instance of the class. + + The projection. + Name of the RHS property. + + + + Initializes a new instance of the class + that compares two mapped properties using an "greater than or equal" constraint. + + The name of the Property to use as the left hand side. + The name of the Property to use as the right hand side. + + + + Get the Sql operator to use for the . + + The string " < " + + + + Gets the typed values for parameters in this projection + + The criteria. + The criteria query. + + + + + An that represents an "greater than" constraint + between two properties. + + + + + Initializes a new instance of the class. + + Name of the LHS property. + The RHS projection. + + + + Initializes a new instance of the class. + + The LHS projection. + The RHS projection. + + + + Initializes a new instance of the class. + + The projection. + Name of the RHS property. + + + + Initializes a new instance of the class + that compares two mapped properties using an "greater than" constraint. + + The name of the Property to use as the left hand side. + The name of the Property to use as the right hand side. + + + + Get the Sql operator to use for the . + + The string " < " + + + + An instance of is passed to criterion, + order and projection instances when actually compiling and + executing the query. This interface is not used by application + code. + + + + Get the name of the column mapped by a property path, ignoring projection alias + + + Get the names of the columns mapped by a property path, ignoring projection aliases + + + Get the type of a property path, ignoring projection aliases + + + Get the names of the columns mapped by a property path + + + Get the type of a property path + + + Get the a typed value for the given property value. + + + Get the entity name of an entity + + + + Get the entity name of an entity, taking into account + the qualifier of the property path + + + + Get the root table alias of an entity + + + + Get the root table alias of an entity, taking into account + the qualifier of the property path + + + + Get the property name, given a possibly qualified property name + + + Get the identifier column names of this entity + + + Get the identifier type of this entity + + + + Create a new query parameter to use in a + + The value and the of the parameter. + A new instance of a query parameter to be added to a . + + + + An object-oriented representation of a query criterion that may be used as a constraint + in a query. + + + Built-in criterion types are provided by the Expression factory class. + This interface might be implemented by application classes but, more commonly, application + criterion types would extend AbstractCriterion. + + + + + Render a SqlString fragment for the expression. + + A SqlString that contains a valid Sql fragment. + + + + Return typed values for all parameters in the rendered SQL fragment + + An array of TypedValues for the Expression. + + + + Return all projections used in this criterion + + An array of IProjection used by the Expression. + + + + An identifier constraint + + + + + An that constrains the property + to a specified list of values. + + + InExpression - should only be used with a Single Value column - no multicolumn properties... + + + + + Initializes a new instance of the class. + + The projection. + The _values. + + + + Determine the type of the elements in the IN clause. + + + + + An that represents an "like" constraint + that is not case sensitive. + + + + + Initializes a new instance of the class. + + The projection. + The value. + The match mode. + + + + Initializes a new instance of the class. + + The projection. + The value. + + + + Initialize a new instance of the + class for a named Property and its value. + + The name of the Property in the class. + The value for the Property. + + + + Render the SQL Fragment. + + The criteria. + The position. + The criteria query. + + + + + Render the SQL Fragment to be used in the Group By Clause. + + The criteria. + The criteria query. + + + + + Return types for a particular user-visible alias + + + + + + + + + + + + + + + + + Get the user-visible aliases for this projection (ie. the ones that will be passed to the ResultTransformer) + + + + + Does this projection specify grouping attributes? + + + + + Does this projection specify aggregate attributes? + + + + + Gets the typed values for parameters in this projection + + The criteria. + The criteria query. + + + + + Get the SQL column aliases used by this projection for the columns it writes for inclusion into the + SELECT clause . NHibernate always uses column aliases + to extract data from the , so it is important that these be implemented + correctly in order for NHibernate to be able to extract these values correctly. + + Just as in , represents the number of columns rendered prior to this projection. + The local criteria to which this project is attached (for resolution). + The overall criteria query instance. + The columns aliases. + + + + Get the SQL column aliases used by this projection for the columns it writes for inclusion into the + SELECT clause () for a particular criteria-level alias. + + The criteria-level alias. + Just as in , represents the number of columns rendered prior to this projection. + The local criteria to which this project is attached (for resolution). + The overall criteria query instance. + The columns aliases. + + + + An that represents empty association constraint. + + + + + An that represents non-empty association constraint. + + + + + A sequence of logical s combined by some associative + logical operator. + + + + + Adds an to the list of s + to junction together. + + The to add. + + This instance. + + + + + Adds an to the list of s + to junction together. + + + + + Adds an to the list of s + to junction together. + + + + + Get the Sql operator to put between multiple s. + + + + + The corresponding to an instance with no added + subcriteria. + + + + + Constructed with property name + + + + + Apply a "between" constraint to the named property + + + + + Apply an "in" constraint to the named property + + + + + Apply an "in" constraint to the named property + + + + + Apply an "in" constraint to the named property + + + + + A case-insensitive "like", similar to Postgres "ilike" operator + + + + + A case-insensitive "like", similar to Postgres "ilike" operator + + + + + Apply an "is empty" constraint to the named property + + + + + Apply a "not is empty" constraint to the named property + + + + + Apply an "is null" constraint to the named property + + + + + Apply an "not is null" constraint to the named property + + + + + Apply a "like" constraint to the named property + + + + + Apply a "like" constraint to the named property + + + + + Apply a "like" constraint to the named property + + + + + Constructed with property name + + + + + Add a property equal subquery criterion + + detached subquery + + + + Add a property equal all subquery criterion + + detached subquery + + + + Create a property greater than or equal subquery criterion + + detached subquery + + + + Create a property greater than or equal all subquery criterion + + detached subquery + + + + Create a property greater than or equal some subquery criterion + + detached subquery + + + + Create a property greater than subquery criterion + + detached subquery + + + + Create a property greater than all subquery criterion + + detached subquery + + + + Create a property greater than some subquery criterion + + detached subquery + + + + Create a property in subquery criterion + + detached subquery + + + + Create a property less than or equal subquery criterion + + detached subquery + + + + Create a property less than or equal all subquery criterion + + detached subquery + + + + Create a property less than or equal some subquery criterion + + detached subquery + + + + Create a property less than subquery criterion + + detached subquery + + + + Create a property less than all subquery criterion + + detached subquery + + + + Create a property less than some subquery criterion + + detached subquery + + + + Create a property not equal subquery criterion + + detached subquery + + + + Create a property not in subquery criterion + + detached subquery + + + + Create an alias for the previous projection + + + + + Select an arbitrary projection + + + + + A property average value + + + + + A property average value + + + + + A property value count + + + + + A property value count + + + + + A distinct property value count + + + + + A distinct property value count + + + + + A grouping property value + + + + + A grouping property value + + + + + A property maximum value + + + + + A property maximum value + + + + + A property minimum value + + + + + A property minimum value + + + + + A projected property value + + + + + A projected property value + + + + + A property value sum + + + + + A property value sum + + + + + Constructed with property name + + + + + Apply a "between" constraint to the named property + + + + + Apply an "in" constraint to the named property + + + + + Apply an "in" constraint to the named property + + + + + Apply an "in" constraint to the named property + + + + + A case-insensitive "like", similar to Postgres "ilike" operator + + + + + A case-insensitive "like", similar to Postgres "ilike" operator + + + + + Apply an "is empty" constraint to the named property + + + + + Apply a "not is empty" constraint to the named property + + + + + Apply an "is null" constraint to the named property + + + + + Apply an "not is null" constraint to the named property + + + + + Apply a "like" constraint to the named property + + + + + Apply a "like" constraint to the named property + + + + + Apply a "like" constraint to the named property + + + + + Add an Exists subquery criterion + + + + + Add a NotExists subquery criterion + + + + + Subquery expression in the format + .Where(t => t.Property [==, !=, >, etc.] detachedQueryOver.As<propertyType>()) + + + + + Subquery expression in the format + .Where(() => alias.Property [==, !=, >, etc.] detachedQueryOver.As<propertyType>()) + + + + + Subquery expression in the format + .WhereAll(t => t.Property [==, !=, >, etc.] detachedQueryOver.As<propertyType>()) + + + + + Subquery expression in the format + .WhereAll(() => alias.Property [==, !=, >, etc.] detachedQueryOver.As<propertyType>()) + + + + + Subquery expression in the format + .WhereSome(t => t.Property [==, !=, >, etc.] detachedQueryOver.As<propertyType>()) + + + + + Subquery expression in the format + .WhereSome(() => alias.Property [==, !=, >, etc.] detachedQueryOver.As<propertyType>()) + + + + + Add a property equal subquery criterion + + detached subquery + + + + Add a property equal all subquery criterion + + detached subquery + + + + Create a property greater than or equal subquery criterion + + detached subquery + + + + Create a property greater than or equal all subquery criterion + + detached subquery + + + + Create a property greater than or equal some subquery criterion + + detached subquery + + + + Create a property greater than subquery criterion + + detached subquery + + + + Create a property greater than all subquery criterion + + detached subquery + + + + Create a property greater than some subquery criterion + + detached subquery + + + + Create a property in subquery criterion + + detached subquery + + + + Create a property less than or equal subquery criterion + + detached subquery + + + + Create a property less than or equal all subquery criterion + + detached subquery + + + + Create a property less than or equal some subquery criterion + + detached subquery + + + + Create a property less than subquery criterion + + detached subquery + + + + Create a property less than all subquery criterion + + detached subquery + + + + Create a property less than some subquery criterion + + detached subquery + + + + Create a property not equal subquery criterion + + detached subquery + + + + Create a property not in subquery criterion + + detached subquery + + + + An that represents an "less than or equal" constraint + between two properties. + + + + + Initializes a new instance of the class. + + Name of the LHS property. + The RHS projection. + + + + Initializes a new instance of the class. + + The LHS projection. + The RHS projection. + + + + Initializes a new instance of the class. + + The projection. + Name of the RHS property. + + + + Initializes a new instance of the class + that compares two mapped properties using an "less than or equal" constraint. + + The name of the Property to use as the left hand side. + The name of the Property to use as the right hand side. + + + + Get the Sql operator to use for the . + + The string " <= " + + + + An that represents an "like" constraint. + + + The case sensitivity depends on the database settings for string + comparisons. Use if the + string comparison should not be case sensitive. + + + + + An that combines two s + with a operator (either "and" or "or") between them. + + + + + Initialize a new instance of the class that + combines two other s. + + The to use in the Left Hand Side. + The to use in the Right Hand Side. + + + + Gets the that will be on the Left Hand Side of the Op. + + + + + Gets the that will be on the Right Hand Side of the Op. + + + + + Combines the for the Left Hand Side and the + Right Hand Side of the Expression into one array. + + An array of s. + + + + Converts the LogicalExpression to a . + + A well formed SqlString for the Where clause. + The SqlString will be enclosed by ( and ). + + + + Get the Sql operator to put between the two s. + + + + + Gets a string representation of the LogicalExpression. + + + The String contains the LeftHandSide.ToString() and the RightHandSide.ToString() + joined by the Op. + + + This is not a well formed Sql fragment. It is useful for logging what Expressions + are being combined. + + + + + An that represents an "less than" constraint + between two properties. + + + + + Initializes a new instance of the class. + + Name of the LHS property. + The RHS projection. + + + + Initializes a new instance of the class. + + The LHS projection. + The RHS projection. + + + + Initializes a new instance of the class. + + The projection. + Name of the RHS property. + + + + Initializes a new instance of the class + that compares two mapped properties using an "less than" constraint. + + The name of the Property to use as the left hand side. + The name of the Property to use as the right hand side. + + + + Get the Sql operator to use for the . + + The string " < " + + + + Represents an strategy for matching strings using "like". + + + + + Initialize a new instance of the class. + + The code that identifies the match mode. + The friendly name of the match mode. + + The parameter intCode is used as the key of + to store instances and to ensure only instance of a particular + is created. + + + + + The string representation of the . + + The friendly name used to describe the . + + + + Convert the pattern, by appending/prepending "%" + + The string to convert to the appropriate match pattern. + + A that contains a "%" in the appropriate place + for the Match Strategy. + + + + + Match the entire string to the pattern + + + + + Match the start of the string to the pattern + + + + + Match the end of the string to the pattern + + + + + Match the pattern anywhere in the string + + + + + The that matches the entire string to the pattern. + + + + + Initialize a new instance of the class. + + + + + Converts the string to the Exact MatchMode. + + The string to convert to the appropriate match pattern. + The pattern exactly the same as it was passed in. + + + + The that matches the start of the string to the pattern. + + + + + Initialize a new instance of the class. + + + + + Converts the string to the Start MatchMode. + + The string to convert to the appropriate match pattern. + The pattern with a "%" appended at the end. + + + + The that matches the end of the string to the pattern. + + + + + Initialize a new instance of the class. + + + + + Converts the string to the End MatchMode. + + The string to convert to the appropriate match pattern. + The pattern with a "%" appended at the beginning. + + + + The that exactly matches the string + by appending "%" to the beginning and end. + + + + + Initialize a new instance of the class. + + + + + Converts the string to the Exact MatchMode. + + The string to convert to the appropriate match pattern. + The pattern with a "%" appended at the beginning and the end. + + + + An that negates another . + + + + + Initialize a new instance of the class for an + + + The to negate. + + + + An that represents "not null" constraint. + + + + + Initializes a new instance of the class. + + The projection. + + + + Initialize a new instance of the class for a named + Property that should not be null. + + The name of the Property in the class. + + + + An that represents "null" constraint. + + + + + Initializes a new instance of the class. + + The projection. + + + + Initialize a new instance of the class for a named + Property that should be null. + + The name of the Property in the class. + + + + + + + Represents an order imposed upon a + result set. + + + Should Order implement ICriteriaQuery? + + + + + Render the SQL fragment + + + + + Ascending order + + + + + + + Ascending order + + + + + + + Descending order + + + + + + + Descending order + + + + + + + An that combines two s with an + "or" between them. + + + + + Initialize a new instance of the class for + two s. + + The to use as the left hand side. + The to use as the right hand side. + + + + Get the Sql operator to put between the two s. + + Returns "or" + + + + Gets the typed values for parameters in this projection + + The criteria. + The criteria query. + + + + + The criterion package may be used by applications as a framework for building + new kinds of Projection. However, it is intended that most applications will + simply use the built-in projection types via the static factory methods of this class.
+
+ The factory methods that take an alias allow the projected value to be referred to by + criterion and order instances. +
+
+ + + Projection for root entity. + + + + + + Projection for entity with given alias. + + The type of the entity. + The alias of the entity. + + + + + Projection for entity with given alias. + + /// The type of the entity. + The alias of the entity. + + + + + Projection for entity with given alias. + + /// The type of the entity. + The alias of the entity. + A projection of the entity. + + + + Create a distinct projection from a projection + + + + + + + Create a new projection list + + + + + + The query row count, ie. count(*) + + The RowCount projection mapped to an . + + + + The query row count, ie. count(*) + + The RowCount projection mapped to an . + + + + A property value count + + + + + + + A property value count + + + + + + + A distinct property value count + + + + + + + A property maximum value + + + + + + + A projection maximum value + + + + + + + A property minimum value + + + + + + + A projection minimum value + + + + + + + A property average value + + + + + + + A property average value + + + + + + + A property value sum + + + + + + + A property value sum + + + + + + + A SQL projection, a typed select clause fragment + + + + + + + + + A grouping SQL projection, specifying both select clause and group by clause fragments + + + + + + + + + + A grouping property value + + + + + + + A grouping projection value + + + + + + + A projected property value + + + + + + + A projected identifier value + + + + + + Assign an alias to a projection, by wrapping it + + + + + + + + Casts the projection result to the specified type. + + The type. + The projection. + + + + + Return a constant value + + The obj. + + + + + Return a constant value + + The obj. + + + + + + Calls the named + + Name of the function. + The type. + The projections. + + + + + Calls the specified + + the function. + The type. + The projections. + + + + + Conditionally return the true or false part, depending on the criterion + + The criterion. + The when true. + The when false. + + + + + A property average value + + + + + A property average value + + + + + A property value count + + + + + A property value count + + + + + A distinct property value count + + + + + A distinct property value count + + + + + A grouping property value + + + + + A grouping property value + + + + + A property maximum value + + + + + A property maximum value + + + + + A property minimum value + + + + + A property minimum value + + + + + A projected property value + + + + + A projected property value + + + + + A property value sum + + + + + A property value sum + + + + + Project SQL function concat() + Note: throws an exception outside of a QueryOver expression + + + + + Create an alias for a projection + + the projection instance + LambdaExpression returning an alias + return NHibernate.Criterion.IProjection + + + + Create an alias for a projection + + the projection instance + alias + return NHibernate.Criterion.IProjection + + + + Project SQL function sqrt() + Note: throws an exception outside of a QueryOver expression + + + + + Project SQL function sqrt() + Note: throws an exception outside of a QueryOver expression + + + + + Project SQL function sqrt() + Note: throws an exception outside of a QueryOver expression + + + + + Project SQL function sqrt() + Note: throws an exception outside of a QueryOver expression + + + + + Project SQL function sqrt() + Note: throws an exception outside of a QueryOver expression + + + + + Project SQL function lower() + Note: throws an exception outside of a QueryOver expression + + + + + Project SQL function upper() + Note: throws an exception outside of a QueryOver expression + + + + + Project SQL function abs() + Note: throws an exception outside of a QueryOver expression + + + + + Project SQL function abs() + Note: throws an exception outside of a QueryOver expression + + + + + Project SQL function abs() + Note: throws an exception outside of a QueryOver expression + + + + + Project SQL function trim() + Note: throws an exception outside of a QueryOver expression + + + + + Project SQL function length() + Note: throws an exception outside of a QueryOver expression + + + + + Project SQL function bit_length() + Note: throws an exception outside of a QueryOver expression + + + + + Project SQL function substring() + Note: throws an exception outside of a QueryOver expression + + + + + Project SQL function locate() + Note: throws an exception outside of a QueryOver expression + + + + + Project SQL function coalesce() + Note: throws an exception outside of a QueryOver expression + + + + + Project SQL function coalesce() + Note: throws an exception outside of a QueryOver expression + + + + + Project SQL function mod() + Note: throws an exception outside of a QueryOver expression + + + + + Project Entity + + + + + A factory for property-specific AbstractCriterion and projection instances + + + + + Get a component attribute of this property + + + + + Superclass for an that represents a + constraint between two properties (with SQL binary operators). + + + + + Initializes a new instance of the class. + + The projection. + Name of the RHS property. + + + + Initializes a new instance of the class. + + The LHS projection. + The RHS projection. + + + + Initializes a new instance of the class. + + Name of the LHS property. + Name of the RHS property. + + + + Initializes a new instance of the class. + + Name of the LHS property. + The RHS projection. + + + + Get the Sql operator to use for the property expression. + + + + + + + + A property value, or grouped property value + + + + + A comparison between a property value in the outer query and the + result of a subquery + + + + + Implementation of the interface + + + + + The namespace may be used by applications as a framework for building + new kinds of . + However, it is intended that most applications will + simply use the built-in criterion types via the static factory methods of this class. + + + + + + + Apply an "equal" constraint to the identifier property + + + ICriterion + + + + Apply an "equal" constraint from the projection to the identifier property + + The projection. + ICriterion + + + + Apply an "equal" constraint to the named property + + The name of the Property in the class. + The value for the Property. + + + + Apply an "equal" constraint to the projection + + The projection. + The value for the Property. + + + + Apply a "like" constraint to the named property + + The name of the Property in the class. + The value for the Property. + A . + + + + Apply a "like" constraint to the project + + The projection. + The value for the Property. + A . + + + + Apply a "like" constraint to the project + + The projection. + The value for the Property. + The match mode. + A . + + + + A case-insensitive "like", similar to Postgres "ilike" operator + + The name of the Property in the class. + The value for the Property. + An . + + + + A case-insensitive "like", similar to Postgres "ilike" operator + + The projection. + The value for the Property. + + An . + + + + + Apply a "greater than" constraint to the named property + + The name of the Property in the class. + The value for the Property. + + + + Apply a "greater than" constraint to the projection + + The projection. + The value for the Property. + + + + Apply a "less than" constraint to the named property + + The name of the Property in the class. + The value for the Property. + + + + Apply a "less than" constraint to the projection + + The projection. + The value for the Property. + + + + Apply a "less than or equal" constraint to the named property + + The name of the Property in the class. + The value for the Property. + + + + Apply a "less than or equal" constraint to the projection + + The projection. + The value for the Property. + + + + Apply a "greater than or equal" constraint to the named property + + The name of the Property in the class. + The value for the Property. + + + + Apply a "greater than or equal" constraint to the projection + + The projection. + The value for the Property. + + + + Apply a "between" constraint to the named property + + The name of the Property in the class. + The low value for the Property. + The high value for the Property. + A . + + + + Apply a "between" constraint to the projection + + The projection. + The low value for the Property. + The high value for the Property. + A . + + + + Apply an "in" constraint to the named property + + The name of the Property in the class. + An array of values. + An . + + + + Apply an "in" constraint to the projection + + The projection. + An array of values. + An . + + + + Apply an "in" constraint to the projection + + The projection. + An ICollection of values. + An . + + + + Apply an "in" constraint to the named property + + The name of the Property in the class. + An ICollection of values. + An . + + + + Apply an "in" constraint to the named property. This is the generic equivalent + of , renamed to avoid ambiguity. + + The name of the Property in the class. + An + of values. + An . + + + + Apply an "in" constraint to the projection. This is the generic equivalent + of , renamed to avoid ambiguity. + + + The projection. + An + of values. + An . + + + + Apply an "is null" constraint to the named property + + The name of the Property in the class. + A . + + + + Apply an "is null" constraint to the projection + + The projection. + A . + + + + Apply an "equal" constraint to two properties + + The lhs Property Name + The rhs Property Name + A . + + + + Apply an "equal" constraint to projection and property + + The projection. + The rhs Property Name + A . + + + + Apply an "equal" constraint to lshProjection and rshProjection + + The LHS projection. + The RSH projection. + A . + + + + Apply an "equal" constraint to the property and rshProjection + + Name of the property. + The RSH projection. + A . + + + + Apply an "not equal" constraint to two properties + + The lhs Property Name + The rhs Property Name + A . + + + + Apply an "not equal" constraint to projection and property + + The projection. + The rhs Property Name + A . + + + + Apply an "not equal" constraint to the projections + + The LHS projection. + The RHS projection. + A . + + + + Apply an "not equal" constraint to the projections + + Name of the property. + The RHS projection. + A . + + + + Apply a "greater than" constraint to two properties + + The lhs Property Name + The rhs Property Name + A . + + + + Apply a "greater than" constraint to two properties + + The projection. + The rhs Property Name + A . + + + + Apply a "greater than" constraint to two properties + + Name of the property. + The projection. + A . + + + + Apply a "greater than" constraint to two properties + + The LHS projection. + The RHS projection. + A . + + + + Apply a "greater than or equal" constraint to two properties + + The lhs Property Name + The rhs Property Name + A . + + + + Apply a "greater than or equal" constraint to two properties + + The LHS projection. + The RHS projection. + A . + + + + Apply a "greater than or equal" constraint to two properties + + The projection. + The rhs Property Name + A . + + + + Apply a "greater than or equal" constraint to two properties + + The lhs Property Name + The projection. + A . + + + + Apply a "less than" constraint to two properties + + The lhs Property Name + The rhs Property Name + A . + + + + Apply a "less than" constraint to two properties + + The projection. + The rhs Property Name + A . + + + + Apply a "less than" constraint to two properties + + The lhs Property Name + The projection. + A . + + + + Apply a "less than" constraint to two properties + + The LHS projection. + The RHS projection. + A . + + + + Apply a "less than or equal" constraint to two properties + + The lhs Property Name + The rhs Property Name + A . + + + + Apply a "less than or equal" constraint to two properties + + The projection. + The rhs Property Name + A . + + + + Apply a "less than or equal" constraint to two properties + + The lhs Property Name + The projection. + A . + + + + Apply a "less than or equal" constraint to two properties + + The LHS projection. + The RHS projection. + A . + + + + Apply an "is not null" constraint to the named property + + The name of the Property in the class. + A . + + + + Apply an "is not null" constraint to the named property + + The projection. + A . + + + + Apply an "is not empty" constraint to the named property + + The name of the Property in the class. + A . + + + + Apply an "is not empty" constraint to the named property + + The name of the Property in the class. + A . + + + + Return the conjunction of two expressions + + The Expression to use as the Left Hand Side. + The Expression to use as the Right Hand Side. + An . + + + + Return the disjunction of two expressions + + The Expression to use as the Left Hand Side. + The Expression to use as the Right Hand Side. + An . + + + + Return the negation of an expression + + The Expression to negate. + A . + + + + Group expressions together in a single conjunction (A and B and C...) + + + + + Group expressions together in a single disjunction (A or B or C...) + + + + + Apply an "equals" constraint to each property in the key set of a IDictionary + + a dictionary from property names to values + + + + + Create an ICriterion for the supplied LambdaExpression + + generic type + lambda expression + return NHibernate.Criterion.ICriterion + + + + Create an ICriterion for the supplied LambdaExpression + + lambda expression + return NHibernate.Criterion.ICriterion + + + + Create an ICriterion for the negation of the supplied LambdaExpression + + generic type + lambda expression + return NHibernate.Criterion.ICriterion + + + + Create an ICriterion for the negation of the supplied LambdaExpression + + lambda expression + return NHibernate.Criterion.ICriterion + + + + Build an ICriterion for the given property + + lambda expression identifying property + returns LambdaRestrictionBuilder + + + + Build an ICriterion for the given property + + lambda expression identifying property + returns LambdaRestrictionBuilder + + + + Apply a "like" restriction in a QueryOver expression + Note: throws an exception outside of a QueryOver expression + + + + + Apply a "like" restriction in a QueryOver expression + Note: throws an exception outside of a QueryOver expression + + + + + Apply a "like" restriction in a QueryOver expression + Note: throws an exception outside of a QueryOver expression + + + + + Apply a "like" restriction in a QueryOver expression + Note: throws an exception outside of a QueryOver expression + + + + + Apply a "like" restriction in a QueryOver expression + Note: throws an exception outside of a QueryOver expression + + + + + Apply an "in" constraint to the named property + Note: throws an exception outside of a QueryOver expression + + + + + Apply an "in" constraint to the named property + Note: throws an exception outside of a QueryOver expression + + + + + Apply a "between" constraint to the named property + Note: throws an exception outside of a QueryOver expression + + + + + A comparison between a property value in the outer query and the + result of a subquery + + + + + The base class for an that compares a single Property + to a value. + + + + + Initialize a new instance of the class for a named + Property and its value. + + The name of the Property in the class. + The value for the Property. + The SQL operation. + + + + Gets the named Property for the Expression. + + A string that is the name of the Property. + + + + Gets the Value for the Expression. + + An object that is the value for the Expression. + + + + Converts the SimpleExpression to a . + + A SqlString that contains a valid Sql fragment. + + + + Get the Sql operator to use for the specific + subclass of . + + + + + A single-column projection that may be aliased + + + + + Gets the typed values for parameters in this projection + + The criteria. + The criteria query. + + + + + A comparison between a constant value and the the result of a subquery + + + + + An that creates a SQLExpression. + The string {alias} will be replaced by the alias of the root entity. + + + This allows for database specific Expressions at the cost of needing to + write a correct . + + + + + A SQL fragment. The string {alias} will be replaced by the alias of the root entity. + + + + + Gets the typed values for parameters in this projection + + The criteria. + The criteria query. + + + + + Factory class for AbstractCriterion instances that represent + involving subqueries. + Expression + Projection + AbstractCriterion + + + + + Create a ICriterion for the specified property subquery expression + + generic type + lambda expression + returns LambdaSubqueryBuilder + + + + Create a ICriterion for the specified property subquery expression + + lambda expression + returns LambdaSubqueryBuilder + + + + Create a ICriterion for the specified value subquery expression + + value + returns LambdaSubqueryBuilder + + + + Create ICriterion for subquery expression using lambda syntax + + type of property + lambda expression + NHibernate.ICriterion.AbstractCriterion + + + + Create ICriterion for (exact) subquery expression using lambda syntax + + lambda expression + NHibernate.ICriterion.AbstractCriterion + + + + Create ICriterion for (all) subquery expression using lambda syntax + + type of property + lambda expression + NHibernate.ICriterion.AbstractCriterion + + + + Create ICriterion for (all) subquery expression using lambda syntax + + lambda expression + NHibernate.ICriterion.AbstractCriterion + + + + Create ICriterion for (some) subquery expression using lambda syntax + + type of property + lambda expression + NHibernate.ICriterion.AbstractCriterion + + + + Create ICriterion for (some) subquery expression using lambda syntax + + lambda expression + NHibernate.ICriterion.AbstractCriterion + + + + Add an Exists subquery criterion + + + + + Add a NotExists subquery criterion + + + + + A property value, or grouped property value + + + + + Represents a dialect of SQL implemented by a particular RDBMS. Subclasses + implement NHibernate compatibility with different systems. + + + Subclasses should provide a public default constructor that Register() + a set of type mappings and default Hibernate properties. + + + + + Given a callable statement previously processed by , + extract the from the OUT parameter. + + The callable statement. + A cancellation token that can be used to cancel the work + The extracted result set. + SQLException Indicates problems extracting the result set. + + + Characters used for quoting sql identifiers + + + Characters used for closing quoted sql identifiers + + + + The base constructor for Dialect. + + + Every subclass should override this and call Register() with every except + , , , , + , . + + + The Default properties for this Dialect should also be set - such as whether or not to use outer-joins + and what the batch size should be. + + + + + Get an instance of the dialect specified by the current properties. + The specified Dialect + + + + Get from a property bag (prop name ) + + The property bag. + An instance of . + When is null. + When the property bag don't contains de property . + + + + Configure the dialect. + + The configuration settings. + + + + Get the name of the database type associated with the given + , + + The SqlType + The database type name used by ddl. + + + + Get the name of the database type associated with the given + . + + The SqlType + The datatype length + The datatype precision + The datatype scale + The database type name used by ddl. + + + + Gets the name of the longest registered type for a particular DbType. + + + + + + + Get the name of the database type appropriate for casting operations + (via the CAST() SQL function) for the given typecode. + + The typecode + The database type name + + + + Get the name of the database type appropriate for casting operations + (via the CAST() SQL function) for the given typecode. + + The typecode. + The source for type names. + The database type name. + + + + Subclasses register a typename for the given type code and maximum + column length. $l in the type name will be replaced by the column + length (if appropriate) + + The typecode + Maximum length or scale of database type + The database type name + + + + Subclasses register a typename for the given type code. $l in the + typename will be replaced by the column length (if appropriate). + + The typecode + The database type name + + + + Override provided s. + + The original . + Refined s. + + + + Do we need to drop constraints before dropping tables in the dialect? + + + + + Do we need to qualify index names with the schema name? + + + + + Does this dialect support the UNIQUE column syntax? + + + + Does this dialect support adding Unique constraints via create and alter table ? + + + + Does this dialect support adding foreign key constraints via alter table? If not, it's assumed they can only be added through create table. + + + + + The syntax used to add a foreign key constraint to a table. If SupportsForeignKeyConstraintInAlterTable is false, the returned string will be added to the create table statement instead. In this case, extra strings, like "add", that apply when using alter table should be omitted. + + The FK constraint name. + The names of the columns comprising the FK + The table referenced by the FK + The explicit columns in the referencedTable referenced by this FK. + + if false, constraint should be explicit about which column names the constraint refers to + + the "add FK" fragment + + + + The syntax used to add a primary key constraint to a table + + + + + + Does the dialect support the syntax 'drop table if exists NAME' + + + + + Does the dialect support the syntax 'drop table NAME if exists' + + + + Does this dialect support column-level check constraints? + True if column-level CHECK constraints are supported; false otherwise. + + + Does this dialect support table-level check constraints? + True if table-level CHECK constraints are supported; false otherwise. + + + + Does this dialect supports null values in columns belonging to an unique constraint/index? + + Some databases do not accept null in unique constraints at all. In such case, + this property should be overriden for yielding false. This property is not meant for distinguishing + databases ignoring null when checking uniqueness (ANSI behavior) from those considering null + as a value and checking for its uniqueness. + + + + Get a strategy instance which knows how to acquire a database-level lock + of the specified mode for this dialect. + + The persister for the entity to be locked. + The type of lock to be acquired. + The appropriate locking strategy. + + + + Given a lock mode, determine the appropriate for update fragment to use. + + The lock mode to apply. + The appropriate for update fragment. + + + + Get the string to append to SELECT statements to acquire locks + for this dialect. + + The appropriate FOR UPDATE clause string. + + + Is FOR UPDATE OF syntax supported? + if the database supports FOR UPDATE OF syntax; otherwise. + + + Is FOR UPDATE OF syntax expecting columns? + if the database expects a column list with FOR UPDATE OF syntax, + if it expects table alias instead or do not support FOR UPDATE OF syntax. + + + + Does this dialect support FOR UPDATE in conjunction with outer joined rows? + + True if outer joined rows can be locked via FOR UPDATE. + + + + Get the FOR UPDATE OF column_list fragment appropriate for this + dialect given the aliases of the columns to be write locked. + + The columns to be write locked. + The appropriate FOR UPDATE OF column_list clause string. + + + + Retrieves the FOR UPDATE NOWAIT syntax specific to this dialect + + The appropriate FOR UPDATE NOWAIT clause string. + + + + Get the FOR UPDATE OF column_list NOWAIT fragment appropriate + for this dialect given the aliases of the columns or tables to be write locked. + + The columns or tables to be write locked. + The appropriate FOR UPDATE colunm_or_table_list NOWAIT clause string. + + + + Modifies the given SQL by applying the appropriate updates for the specified + lock modes and key columns. + + the SQL string to modify + a map of lock modes indexed by aliased table names. + a map of key columns indexed by aliased table names. + the modified SQL string. + + The behavior here is that of an ANSI SQL SELECT FOR UPDATE. This + method is really intended to allow dialects which do not support + SELECT FOR UPDATE to achieve this in their own fashion. + + + + + Some dialects support an alternative means to SELECT FOR UPDATE, + whereby a "lock hint" is appends to the table name in the from clause. + + The lock mode to apply + The name of the table to which to apply the lock hint. + The table with any required lock hints. + + + + Return SQL needed to drop the named table. May (and should) use + some form of "if exists" clause, and cascade constraints. + + + + + + Does this dialect support temporary tables? + + + Generate a temporary table name given the bas table. + The table name from which to base the temp table name. + The generated temp table name. + + + + Does the dialect require that temporary table DDL statements occur in + isolation from other statements? This would be the case if the creation + would cause any current transaction to get committed implicitly. + + see the result matrix above. + + JDBC defines a standard way to query for this information via the + {@link java.sql.DatabaseMetaData#dataDefinitionCausesTransactionCommit()} + method. However, that does not distinguish between temporary table + DDL and other forms of DDL; MySQL, for example, reports DDL causing a + transaction commit via its driver, even though that is not the case for + temporary table DDL. +

+ Possible return values and their meanings:

    +
  • {@link Boolean#TRUE} - Unequivocally, perform the temporary table DDL in isolation.
  • +
  • {@link Boolean#FALSE} - Unequivocally, do not perform the temporary table DDL in isolation.
  • +
  • null - defer to the JDBC driver response in regards to {@link java.sql.DatabaseMetaData#dataDefinitionCausesTransactionCommit()}
  • +
+
+
+ + Do we need to drop the temporary table after use? + + + + Registers an OUT parameter which will be returning a + . How this is accomplished varies greatly + from DB to DB, hence its inclusion (along with {@link #getResultSet}) here. + + The callable statement. + The bind position at which to register the OUT param. + The number of (contiguous) bind positions used. + + + + Given a callable statement previously processed by , + extract the from the OUT parameter. + + The callable statement. + The extracted result set. + SQLException Indicates problems extracting the result set. + + + Does this dialect support a way to retrieve the database's current timestamp value? + + + Does this dialect support a way to retrieve the database's current UTC timestamp value? + + + + Gives the best resolution that the database can use for storing + date/time values, in ticks. + + + + For example, if the database can store values with 100-nanosecond + precision, this property is equal to 1L. If the database can only + store values with 1-millisecond precision, this property is equal + to 10000L (number of ticks in a millisecond). + + + Used in TimestampType. + + + + + + The syntax used to drop a foreign key constraint from a table. + + The name of the foreign key constraint to drop. + + The SQL string to drop the foreign key constraint. + + + + + The syntax that is used to check if a constraint does not exists before creating it + + The table. + The name. + + + + + The syntax that is used to close the if for a constraint exists check, used + for dialects that requires begin/end for ifs + + The table. + The name. + + + + + The syntax that is used to check if a constraint exists before dropping it + + The table. + The name. + + + + + The syntax that is used to close the if for a constraint exists check, used + for dialects that requires begin/end for ifs + + The table. + The name. + + + + + The syntax that is used to check if a constraint does not exists before creating it + + The catalog. + The schema. + The table. + The name. + + + + + The syntax that is used to close the if for a constraint exists check, used + for dialects that requires begin/end for ifs + + The catalog. + The schema. + The table. + The name. + + + + + The syntax that is used to check if a constraint exists before dropping it + + The catalog. + The schema. + The table. + The name. + + + + + The syntax that is used to close the if for a constraint exists check, used + for dialects that requires begin/end for ifs + + The catalog. + The schema. + The table. + The name. + + + + + The syntax used to drop a primary key constraint from a table. + + The name of the primary key constraint to drop. + + The SQL string to drop the primary key constraint. + + + + + The syntax used to drop an index constraint from a table. + + The name of the index constraint to drop. + + The SQL string to drop the primary key constraint. + + + + + Completely optional cascading drop clause + + + + Only needed if the Dialect does not have SupportsForeignKeyConstraintInAlterTable. + + + Only needed if the Dialect does not have SupportsForeignKeyConstraintInAlterTable. + + + + Does this dialect support identity column key generation? + + + + + Does the dialect support some form of inserting and selecting + the generated IDENTITY value all in the same statement. + + + + + Whether this dialect has an identity clause added to the data type or a + completely separate identity data type. + + + + + Provided we , then attach the + "select identity" clause to the insert statement. + + The insert command + + The insert command with any necessary identity select clause attached. + Note, if == false then + the insert-string should be returned without modification. + + + + + Provided we , then attach the + "select identity" clause to the insert statement. + + The insert command + The identifier name + + The insert command with any necessary identity select clause attached. + Note, if == false then + the insert-string should be returned without modification. + + + + + Get the select command to use to retrieve the last generated IDENTITY + value for a particular table. + + The PK column. + The table into which the insert was done. + The type code. + The appropriate select command. + + + + Get the select command to use to retrieve the last generated IDENTITY value. + + The appropriate select command + + + + The syntax used during DDL to define a column as being an IDENTITY of + a particular type. + + The type code. + The appropriate DDL fragment. + + + + The keyword used to specify an identity column, if native key generation is supported + + + + + Set this to false if no table-level primary key constraint should be generated when an identity column has been specified for the table. + This is used as a work-around for SQLite so it doesn't tell us we have "more than one primary key". + + + + + The keyword used to insert a generated value into an identity column (or null). + Need if the dialect does not support inserts that specify no column values. + + + + + Does this dialect support sequences? + + + + + Does this dialect support "pooled" sequences? + + True if such "pooled" sequences are supported; false otherwise. + + A pooled sequence is one that has a configurable initial size and increment + size. It enables NHibernate to be allocated a pool/block/range of IDs, + which can reduce the frequency of round trips to the database during ID + generation. + + + + + + + Generate the appropriate select statement to to retreive the next value + of a sequence. + + the name of the sequence + String The "nextval" select string. + This should be a "stand alone" select statement. + + + + Typically dialects which support sequences can drop a sequence + with a single command. + + The name of the sequence + The sequence drop commands + + This is convenience form of + to help facilitate that. + + Dialects which support sequences and can drop a sequence in a + single command need *only* override this method. Dialects + which support sequences but require multiple commands to drop + a sequence should instead override . + + + + + The multiline script used to drop a sequence. + + The name of the sequence + The sequence drop commands + + + + Generate the select expression fragment that will retrieve the next + value of a sequence as part of another (typically DML) statement. + + the name of the sequence + The "nextval" fragment. + + This differs from in that this + should return an expression usable within another statement. + + + + + Typically dialects which support sequences can create a sequence + with a single command. + + The name of the sequence + The sequence creation command + + This is convenience form of to help facilitate that. + Dialects which support sequences and can create a sequence in a + single command need *only* override this method. Dialects + which support sequences but require multiple commands to create + a sequence should instead override . + + + + + An optional multi-line form for databases which . + + The name of the sequence + The initial value to apply to 'create sequence' statement + The increment value to apply to 'create sequence' statement + The sequence creation commands + + + + Overloaded form of , additionally + taking the initial value and increment size to be applied to the sequence + definition. + + The name of the sequence + The initial value to apply to 'create sequence' statement + The increment value to apply to 'create sequence' statement + The sequence creation command + + The default definition is to suffix + with the string: " start with {initialValue} increment by {incrementSize}" where + {initialValue} and {incrementSize} are replacement placeholders. Generally + dialects should only need to override this method if different key phrases + are used to apply the allocation information. + + + + Get the select command used retrieve the names of all sequences. + The select command; or null if sequences are not supported. + + + + The class (which implements ) + which acts as this dialects identity-style generation strategy. + + The native generator class. + + Comes into play whenever the user specifies the "identity" generator. + + + + + The class (which implements ) + which acts as this dialects native generation strategy. + + The native generator class. + + Comes into play whenever the user specifies the native generator. + + + + + Create a strategy responsible + for handling this dialect's variations in how joins are handled. + + This dialect's strategy. + + + + Create a strategy responsible + for handling this dialect's variations in how CASE statements are + handled. + + This dialect's strategy. + + + The SQL literal value to which this database maps boolean values. + The boolean value + The appropriate SQL literal. + + + + This specialized string tokenizier will break a string to tokens, taking + into account single quotes, parenthesis and commas and [ ] + Notice that we aren't differentiating between [ ) and ( ] on purpose, it would complicate + the code and it is not legal at any rate. + + + + + Does this dialect support concurrent writing connections? + + + + + Does this dialect support concurrent writing connections in the same transaction? + + + + + Does this Dialect have some kind of LIMIT syntax? + + False, unless overridden. + + + + Does this Dialect support an offset? + + + + + Can parameters be used for a statement containing a LIMIT? + + + + + Does the LIMIT clause take a "maximum" row number instead + of a total number of returned rows? + + True if limit is relative from offset; false otherwise. + + This is easiest understood via an example. Consider you have a table + with 20 rows, but you only want to retrieve rows number 11 through 20. + Generally, a limit with offset would say that the offset = 11 and the + limit = 10 (we only want 10 rows at a time); this is specifying the + total number of returned rows. Some dialects require that we instead + specify offset = 11 and limit = 20, where 20 is the "last" row we want + relative to offset (i.e. total number of rows = 20 - 11 = 9) + So essentially, is limit relative from offset? Or is limit absolute? + + + + + For limit clauses, indicates whether to use 0 or 1 as the offset that returns the first row. Should be true if the first row is at offset 1. + + + + + Attempts to add a LIMIT clause to the given SQL SELECT. + Expects any database-specific offset and limit adjustments to have already been performed (ex. UseMaxForLimit, OffsetStartsAtOne). + + The to base the limit query off. + Offset of the first row to be returned by the query. This may be represented as a parameter, a string literal, or a null value if no limit is requested. This should have already been adjusted to account for OffsetStartsAtOne. + Maximum number of rows to be returned by the query. This may be represented as a parameter, a string literal, or a null value if no offset is requested. This should have already been adjusted to account for UseMaxForLimit. + A new that contains the LIMIT clause. Returns null + if represents a SQL statement to which a limit clause cannot be added, + for example when the query string is custom SQL invoking a stored procedure. + + + + Attempts to generate a string to limit the result set to a number of maximum results with a specified offset into the results. + Expects any database-specific offset and limit adjustments to have already been performed (ex. UseMaxForLimit, OffsetStartsAtOne). + Performs error checking based on the various dialect limit support options. If both parameters and fixed valeus are + specified, this will use the parameter option if possible. Otherwise, it will fall back to a fixed string. + + + + + + + + + + + Some databases require that a limit statement contain the maximum row number + instead of the number of rows to retrieve. This method adjusts source + limit and offset values to account for this. + + + + + + + + Some databases use limit row offsets that start at one instead of zero. + This method adjusts a desired offset using the OffsetStartsAtOne flag. + + + + + + + The opening quote for a quoted identifier. + + + + + The closing quote for a quoted identifier. + + + + + Checks to see if the name has been quoted. + + The name to check if it is quoted + true if name is already quoted. + + The default implementation is to compare the first character + to Dialect.OpenQuote and the last char to Dialect.CloseQuote + + + + + Quotes a name. + + The string that needs to be Quoted. + A QuotedName + +

+ This method assumes that the name is not already Quoted. So if the name passed + in is "name then it will return """name". It escapes the first char + - the " with "" and encloses the escaped string with OpenQuote and CloseQuote. +

+
+
+ + + Quotes a name for being used as a aliasname + + Original implementation calls + Name of the alias + A Quoted name in the format of OpenQuote + aliasName + CloseQuote + +

+ If the aliasName is already enclosed in the OpenQuote and CloseQuote then this + method will return the aliasName that was passed in without going through any + Quoting process. So if aliasName is passed in already Quoted make sure that + you have escaped all of the chars according to your DataBase's specifications. +

+
+
+ + + Quotes a name for being used as a columnname + + Original implementation calls + Name of the column + A Quoted name in the format of OpenQuote + columnName + CloseQuote + +

+ If the columnName is already enclosed in the OpenQuote and CloseQuote then this + method will return the columnName that was passed in without going through any + Quoting process. So if columnName is passed in already Quoted make sure that + you have escaped all of the chars according to your DataBase's specifications. +

+
+
+ + + Quotes a name for being used as a tablename + + Name of the table + A Quoted name in the format of OpenQuote + tableName + CloseQuote + +

+ If the tableName is already enclosed in the OpenQuote and CloseQuote then this + method will return the tableName that was passed in without going through any + Quoting process. So if tableName is passed in already Quoted make sure that + you have escaped all of the chars according to your DataBase's specifications. +

+
+
+ + + Quotes a name for being used as a schemaname + + Name of the schema + A Quoted name in the format of OpenQuote + schemaName + CloseQuote + +

+ If the schemaName is already enclosed in the OpenQuote and CloseQuote then this + method will return the schemaName that was passed in without going through any + Quoting process. So if schemaName is passed in already Quoted make sure that + you have escaped all of the chars according to your DataBase's specifications. +

+
+
+ + + Quotes a name for being used as a catalogname + + Name of the catalog + A Quoted name in the format of OpenQuote + catalogName + CloseQuote + +

+ If the catalogName is already enclosed in the OpenQuote and CloseQuote then this + method will return the catalogName that was passed in without going through any + Quoting process. So if catalogName is passed in already Quoted make sure that + you have escaped all of the chars according to your DataBase's specifications. +

+
+
+ + + Unquotes and unescapes an already quoted name + + Quoted string + Unquoted string + +

+ This method checks the string quoted to see if it is + quoted. If the string quoted is already enclosed in the OpenQuote + and CloseQuote then those chars are removed. +

+

+ After the OpenQuote and CloseQuote have been cleaned from the string quoted + then any chars in the string quoted that have been escaped by doubling them + up are changed back to a single version. +

+

+ The following quoted values return these results + "quoted" = quoted + "quote""d" = quote"d + quote""d = quote"d +

+

+ If this implementation is not sufficient for your Dialect then it needs to be overridden. + MsSql2000Dialect is an example of where UnQuoting rules are different. +

+
+
+ + + Unquotes an array of Quoted Names. + + strings to Unquote + an array of unquoted strings. + + This use UnQuote(string) for each string in the quoted array so + it should not need to be overridden - only UnQuote(string) needs + to be overridden unless this implementation is not sufficient. + + + + + Convert back-tilt quotes in a name for being used as an aliasname. + + Name of the alias. + A name with back-tilt quotes converted if any. + + + + Convert back-tilt quotes in a name for being used as a columnname. + + Name of the column. + A name with back-tilt quotes converted if any. + + + + Convert back-tilt quotes in a name for being used as a tablename. + + Name of the table. + A name with back-tilt quotes converted if any. + + + + Convert back-tilt quotes in a name for being used as a schemaname. + + Name of the schema. + A name with back-tilt quotes converted if any. + + + + Convert back-tilt quotes in a name for being used as a catalogname. + + Name of the catalog. + A name with back-tilt quotes converted if any. + + + + Given a type code, determine an appropriate + null value to use in a select clause. + + The type code. + The appropriate select clause value fragment. + + One thing to consider here is that certain databases might + require proper casting for the nulls here since the select here + will be part of a UNION/UNION ALL. + + + + + Does this dialect support UNION ALL, which is generally a faster variant of UNION? + True if UNION ALL is supported; false otherwise. + + + + + Does this dialect support empty IN lists? + For example, is [where XYZ in ()] a supported construct? + + True if empty in lists are supported; false otherwise. + + + + Are string comparisons implicitly case insensitive. + In other words, does [where 'XYZ' = 'xyz'] resolve to true? + + True if comparisons are case insensitive. + + + + Is this dialect known to support what ANSI-SQL terms "row value + constructor" syntax; sometimes called tuple syntax. +

+ Basically, does it support syntax like + "... where (FIRST_NAME, LAST_NAME) = ('Steve', 'Ebersole') ...". +

+ + True if this SQL dialect is known to support "row value + constructor" syntax; false otherwise. + +
+ + + If the dialect supports {@link #supportsRowValueConstructorSyntax() row values}, + does it offer such support in IN lists as well? +

+ For example, "... where (FIRST_NAME, LAST_NAME) IN ( (?, ?), (?, ?) ) ..." +

+ + True if this SQL dialect is known to support "row value + constructor" syntax in the IN list; false otherwise. + +
+ + + Should LOBs (both BLOB and CLOB) be bound using stream operations (i.e. + {@link java.sql.PreparedStatement#setBinaryStream}). + + True if BLOBs and CLOBs should be bound using stream operations. + + + + Does this dialect support parameters within the select clause of + INSERT ... SELECT ... statements? + + True if this is supported; false otherwise. + + + + Does this dialect require that references to result variables + (i.e, select expression aliases) in an ORDER BY clause be + replaced by column positions (1-origin) as defined by the select clause? + + + true if result variable references in the ORDER BY clause should + be replaced by column positions; false otherwise. + + + + + Does this dialect support asking the result set its positioning + information on forward only cursors. Specifically, in the case of + scrolling fetches, Hibernate needs to use + {@link java.sql.ResultSet#isAfterLast} and + {@link java.sql.ResultSet#isBeforeFirst}. Certain drivers do not + allow access to these methods for forward only cursors. +

+ NOTE : this is highly driver dependent! +

+ + True if methods like {@link java.sql.ResultSet#isAfterLast} and + {@link java.sql.ResultSet#isBeforeFirst} are supported for forward + only cursors; false otherwise. + +
+ + + Does this dialect support definition of cascade delete constraints + which can cause circular chains? + + True if circular cascade delete constraints are supported; false otherwise. + + + + Are subselects supported as the left-hand-side (LHS) of + IN-predicates. + + In other words, is syntax like "... {subquery} IN (1, 2, 3) ..." supported? + + True if subselects can appear as the LHS of an in-predicate;false otherwise. + + + + + Are paged sub-selects supported as the right-hand-side (RHS) of IN-predicates? + + + In other words, is syntax like "... someColumn IN ({paged-sub-query}) ..." supported? + + + if paged sub-selects can appear as the RHS of an in-predicate; otherwise. + + + + Expected LOB usage pattern is such that I can perform an insert + via prepared statement with a parameter binding for a LOB value + without crazy casting to JDBC driver implementation-specific classes... +

+ Part of the trickiness here is the fact that this is largely + driver dependent. For example, Oracle (which is notoriously bad with + LOB support in their drivers historically) actually does a pretty good + job with LOB support as of the 10.2.x versions of their drivers... +

+ + True if normal LOB usage patterns can be used with this driver; + false if driver-specific hookiness needs to be applied. + +
+ + Does the dialect support propagating changes to LOB + values back to the database? Talking about mutating the + internal value of the locator as opposed to supplying a new + locator instance... +

+ For BLOBs, the internal value might be changed by: + {@link java.sql.Blob#setBinaryStream}, + {@link java.sql.Blob#setBytes(long, byte[])}, + {@link java.sql.Blob#setBytes(long, byte[], int, int)}, + or {@link java.sql.Blob#truncate(long)}. +

+ For CLOBs, the internal value might be changed by: + {@link java.sql.Clob#setAsciiStream(long)}, + {@link java.sql.Clob#setCharacterStream(long)}, + {@link java.sql.Clob#setString(long, String)}, + {@link java.sql.Clob#setString(long, String, int, int)}, + or {@link java.sql.Clob#truncate(long)}. +

+ NOTE : I do not know the correct answer currently for + databases which (1) are not part of the cruise control process + or (2) do not {@link #supportsExpectedLobUsagePattern}. +

+ True if the changes are propagated back to the database; false otherwise. +
+ + + Is it supported to materialize a LOB locator outside the transaction in + which it was created? +

+ Again, part of the trickiness here is the fact that this is largely + driver dependent. +

+ NOTE: all database I have tested which {@link #supportsExpectedLobUsagePattern()} + also support the ability to materialize a LOB outside the owning transaction... +

+ True if unbounded materialization is supported; false otherwise. +
+ + + Does this dialect support referencing the table being mutated in + a subquery. The "table being mutated" is the table referenced in + an UPDATE or a DELETE query. And so can that table then be + referenced in a subquery of said UPDATE/DELETE query. +

+ For example, would the following two syntaxes be supported:

    +
  • delete from TABLE_A where ID not in ( select ID from TABLE_A )
  • +
  • update TABLE_A set NON_ID = 'something' where ID in ( select ID from TABLE_A)
  • +
+
+ True if this dialect allows references the mutating table from a subquery. +
+ + Does the dialect support an exists statement in the select clause? + True if exists checks are allowed in the select clause; false otherwise. + + + + For the underlying database, is READ_COMMITTED isolation implemented by + forcing readers to wait for write locks to be released? + + True if writers block readers to achieve READ_COMMITTED; false otherwise. + + + + For the underlying database, is REPEATABLE_READ isolation implemented by + forcing writers to wait for read locks to be released? + + True if readers block writers to achieve REPEATABLE_READ; false otherwise. + + + + Does this dialect support using a JDBC bind parameter as an argument + to a function or procedure call? + + True if the database supports accepting bind params as args; false otherwise. + + + + Does this dialect support subselects? + + + + + Does this dialect support scalar sub-selects? + + + Scalar sub-selects are sub-queries returning a scalar value, not a set. See https://stackoverflow.com/a/648049/1178314 + + + + + Does this dialect support pooling parameter in connection string? + + + + + + Does this dialect support having clause on a grouped by computation? + + + In other words, is syntax like "... group by aComputation having aComputation ..." supported? + + + + + + Does this dialect support distributed transaction? + + + Distributed transactions usually imply the use of, but using + TransactionScope does not imply the transaction will be distributed. + + + + + Does this dialect handles date and time types scale (fractional seconds precision)? + + + + + Retrieve a set of default Hibernate properties for this database. + + + + + Aggregate SQL functions as defined in general. This is + a case-insensitive hashtable! + + + The results of this method should be integrated with the + specialization's data. + + + + + Get the command used to select a GUID from the underlying database. + (Optional operation.) + + The appropriate command. + + + Command used to create a table. + + + + Slight variation on . + The command used to create a multiset table. + + + Here, we have the command used to create a table when there is no primary key and + duplicate rows are expected. +

+ Most databases do not care about the distinction; originally added for + Teradata support which does care. + + + +

Command used to create a temporary table. +
+ + + Get any fragments needing to be postfixed to the command for + temporary table creation. + + + + + Should the value returned by + be treated as callable. Typically this indicates that JDBC escape + syntax is being used... + + + + + Retrieve the command used to retrieve the current timestamp from the database. + + + + + The name of the database-specific SQL function for retrieving the + current timestamp. + + + + + Retrieve the command used to retrieve the current UTC timestamp from the database. + + + + + The name of the database-specific SQL function for retrieving the + current UTC timestamp. + + + + + The keyword used to insert a row without specifying any column values + + + + + The name of the SQL function that transforms a string to lowercase + + + + + The maximum length a SQL alias can have. + + + + + The maximum number of parameters allowed in a query. + + + + + The character used to terminate a SQL statement. + + + + + The syntax used to add a column to a table. + + + + + The syntax for the suffix used to add a column to a table. + + + + + The keyword used to specify a nullable column + + + + + The keyword used to create a primary key constraint + + + + + Supports splitting batches using GO T-SQL command + + + Batches http://msdn.microsoft.com/en-us/library/ms175502.aspx + + + + + Registers a NHibernate name for the given type code. + + The typecode + The NHibernate name + + + + Build an instance of the preferred by this dialect for + converting into NHibernate's ADOException hierarchy. + + The Dialect's preferred . + + The default Dialect implementation simply returns a converter based on X/Open SQLState codes. + + It is strongly recommended that specific Dialect implementations override this + method, since interpretation of a SQL error is much more accurate when based on + the ErrorCode rather than the SQLState. Unfortunately, the ErrorCode is a vendor-specific approach. + + + + + Summary description for InformixDialect. + This dialect is intended to work with IDS version 7.31 + However I can test only version 10.00 as I have only this version at work + + + The InformixDialect defaults the following configuration properties: + + + ConnectionDriver + NHibernate.Driver.OdbcDriver + PrepareSql + true + + + connection.driver_class + + + + + + + + + + + The keyword used to insert a generated value into an identity column (or null). + Need if the dialect does not support inserts that specify no column values. + + + + Command used to create a temporary table. + + + + Get any fragments needing to be postfixed to the command for + temporary table creation. + + + + + Should the value returned by + be treated as callable. Typically this indicates that JDBC escape + sytnax is being used... + + + + + Retrieve the command used to retrieve the current timestamp from the database. + + + + + The name of the database-specific SQL function for retrieving the + current timestamp. + + + + + + + + + + + Does this dialect support FOR UPDATE in conjunction with outer joined rows? + + True if outer joined rows can be locked via FOR UPDATE. + + + + Get the FOR UPDATE OF column_list fragment appropriate for this + dialect given the aliases of the columns to be write locked. + + The columns to be write locked. + The appropriate FOR UPDATE OF column_list clause string. + + + Does this dialect support temporary tables? + + + + Does the dialect require that temporary table DDL statements occur in + isolation from other statements? This would be the case if the creation + would cause any current transaction to get committed implicitly. + + see the result matrix above. + + JDBC defines a standard way to query for this information via the + {@link java.sql.DatabaseMetaData#dataDefinitionCausesTransactionCommit()} + method. However, that does not distinguish between temporary table + DDL and other forms of DDL; MySQL, for example, reports DDL causing a + transaction commit via its driver, even though that is not the case for + temporary table DDL. +

+ Possible return values and their meanings:

    +
  • {@link Boolean#TRUE} - Unequivocally, perform the temporary table DDL in isolation.
  • +
  • {@link Boolean#FALSE} - Unequivocally, do not perform the temporary table DDL in isolation.
  • +
  • null - defer to the JDBC driver response in regards to {@link java.sql.DatabaseMetaData#dataDefinitionCausesTransactionCommit()}
  • +
+
+
+ + Does this dialect support a way to retrieve the database's current timestamp value? + + + + Whether this dialect have an Identity clause added to the data type or a + completely separate identity data type + + + + + + + + The syntax that returns the identity value of the last insert, if native + key generation is supported + + + + + The syntax used during DDL to define a column as being an IDENTITY of + a particular type. + + The type code. + The appropriate DDL fragment. + + + + The keyword used to specify an identity column, if native key generation is supported + + + + + Does this dialect support sequences? + + + + + Create a strategy responsible + for handling this dialect's variations in how joins are handled. + + This dialect's strategy. + + + The SQL literal value to which this database maps boolean values. + The boolean value + The appropriate SQL literal. + + + + Does this Dialect have some kind of LIMIT syntax? + + False, unless overridden. + + + + Does this Dialect support an offset? + + + + + Can parameters be used for a statement containing a LIMIT? + + + + + Does this dialect support UNION ALL, which is generally a faster variant of UNION? + True if UNION ALL is supported; false otherwise. + + + + + + + + A strategy abstraction for how locks are obtained in the underlying database. + + + All locking provided implementations assume the underlying database supports + (and that the connection is in) at least read-committed transaction isolation. + The most glaring exclusion to this is HSQLDB which only offers support for + READ_UNCOMMITTED isolation. + + + + + + Acquire an appropriate type of lock on the underlying data that will + endure until the end of the current transaction. + + The id of the row to be locked + The current version (or null if not versioned) + The object logically being locked (currently not used) + The session from which the lock request originated + A cancellation token that can be used to cancel the work + + + + Acquire an appropriate type of lock on the underlying data that will + endure until the end of the current transaction. + + The id of the row to be locked + The current version (or null if not versioned) + The object logically being locked (currently not used) + The session from which the lock request originated + + + + A locking strategy where the locks are obtained through select statements. + + + + + For non-read locks, this is achieved through the Dialect's specific + SELECT ... FOR UPDATE syntax. + + + + + A locking strategy where the locks are obtained through update statements. + + This strategy is not valid for read style locks. + + + + Construct a locking strategy based on SQL UPDATE statements. + + The metadata for the entity to be locked. + Indicates the type of lock to be acquired. + + read-locks are not valid for this strategy. + + + + + An SQL dialect targeting Sybase Adaptive Server Enterprise (ASE) 15 and higher. + + + The dialect defaults the following configuration properties: + + + Property + Default Value + + + connection.driver_class + + + + + + + + + + + + + + Sybase ASE 15 temporary tables are not supported + + + By default, temporary tables in Sybase ASE 15 can only be created outside a transaction. + This is not supported by NHibernate. Temporary tables (and other DDL) statements can only + be run in a transaction if the 'ddl in tran' database option on tempdb is set to 'true'. + However, Sybase does not recommend this setting due to the performance impact arising from + locking and contention on tempdb system tables. + + + + + This is false only by default. The database can be configured to be + case-insensitive. + + + + + + + + SQL Dialect for SQL Anywhere 10 - for the NHibernate 3.0.0 distribution + Copyright (C) 2010 Glenn Paulley + Contact: http://iablog.sybase.com/paulley + + This NHibernate dialect should be considered BETA software. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + The dialect defaults the following configuration properties: + + + Property + Default Value + + + connection.driver_class + + + + prepare_sql + + + + + + + + SQL Anywhere uses DEFAULT AUTOINCREMENT to identify an IDENTITY + column in a CREATE TABLE statement. + + + + + SQL Anywhere 10 supports READ, WRITE, and INTENT row + locks. INTENT locks are sufficient to ensure that other + concurrent connections cannot modify a row (though other + connections can still read that row). SQL Anywhere also + supports 3 modes of snapshot isolation (multi-version + concurrency control (MVCC). + + SQL Anywhere's FOR UPDATE clause supports + FOR UPDATE BY [ LOCK | VALUES ] + FOR UPDATE OF ( COLUMN LIST ) + + though they cannot be specified at the same time. BY LOCK is + the syntax that acquires INTENT locks. FOR UPDATE BY VALUES + forces the use of the KEYSET cursor, which returns a warning to + the application when a row in the cursor has been subsequently + modified by another connection, and an error if the row has + been deleted. + + SQL Anywhere does not support the FOR UPDATE NOWAIT syntax of + Oracle on a statement-by-statement basis. However, the + identical functionality is provided by setting the connection + option BLOCKING to "OFF", or setting an appropriate timeout + period through the connection option BLOCKING_TIMEOUT. + + + + + SQL Anywhere does support FOR UPDATE OF syntax. However, + in SQL Anywhere one cannot specify both FOR UPDATE OF syntax + and FOR UPDATE BY LOCK in the same statement. To achieve INTENT + locking when using FOR UPDATE OF syntax one must use a table hint + in the query's FROM clause, ie. + + SELECT * FROM FOO WITH( UPDLOCK ) FOR UPDATE OF ( column-list ). + + In this dialect, we avoid this issue by supporting only + FOR UPDATE BY LOCK. + + + + + SQL Anywhere supports FOR UPDATE over cursors containing + outer joins. + + + + + Lock rows in the cursor explicitly using INTENT row locks. + + + + + Enforce the condition that this query is read-only. This ensure that certain + query rewrite optimizations, such as join elimination, can be used. + + + + + Lock rows in the cursor explicitly using INTENT row locks. + + + + + SQL Anywhere does not support FOR UPDATE NOWAIT. However, the intent + is to acquire pessimistic locks on the underlying rows; with NHibernate + one can accomplish this through setting the BLOCKING connection option. + Hence, with this API we lock rows in the cursor explicitly using INTENT row locks. + + + + + We assume that applications using this dialect are NOT using + SQL Anywhere's snapshot isolation modes. + + + + + We assume that applications using this dialect are NOT using + SQL Anywhere's snapshot isolation modes. + + + + + SQL Anywhere supports both double quotes or '[' (Microsoft syntax) for + quoted identifiers. + + Note that quoted identifiers are controlled through + the QUOTED_IDENTIFIER connection option. + + + + + SQL Anywhere supports both double quotes or '[' (Microsoft syntax) for + quoted identifiers. + + + + + SQL Anywhere's implementation of KEYSET-DRIVEN cursors does not + permit absolute positioning. With jConnect as the driver, this support + will succeed because jConnect FETCHes the entire result set to the client + first; it will fail with the iAnywhere JDBC driver. Because the server + may decide to use a KEYSET cursor even if the cursor is declared as + FORWARD ONLY, this support is disabled. + + + + + By default, the SQL Anywhere dbinit utility creates a + case-insensitive database for the CHAR collation. This can + be changed through the use of the -c command line switch on + dbinit, and the setting may differ for the NCHAR collation + for national character sets. Whether or not a database + supports case-sensitive comparisons can be determined via + the DB_Extended_property() function, for example + + SELECT DB_EXTENDED_PROPERTY( 'Collation', 'CaseSensitivity'); + + + + + SQL Anywhere supports COMMENT ON statements for a wide variety of + database objects. When the COMMENT statement is executed an implicit + COMMIT is performed. However, COMMENT syntax for CREATE TABLE, as + expected by NHibernate (see Table.cs), is not supported. + + + + + SQL Anywhere currently supports only "VALUES (DEFAULT)", not + the ANSI standard "DEFAULT VALUES". This latter syntax will be + supported in the SQL Anywhere 11.0.1 release. For the moment, + "VALUES (DEFAULT)" works only for a single-column table. + + + + + SQL Anywhere does not require dropping a constraint before + dropping a table, and the DROP statement syntax used by Hibernate + to drop a constraint is not compatible with SQL Anywhere, so disable it. + + + + + In SQL Anywhere, the syntax, DECLARE LOCAL TEMPORARY TABLE ..., + can also be used, which creates a temporary table with procedure scope, + which may be important for stored procedures. + + + + + Assume that temporary table rows should be preserved across COMMITs. + + + + + SQL Anywhere 10 does not perform a COMMIT upon creation of + a temporary table. However, it does perform an implicit + COMMIT when creating an index over a temporary table, or + upon ALTERing the definition of temporary table. + + + + + SQL Anywhere does support OUT parameters with callable stored procedures. + + + + + SQL Anywhere has a micro-second resolution. + + + + Maintains the set of ANSI SQL keywords + + + + + Retrieve all keywords defined by ANSI SQL:2003 + + + + + An SQL dialect for DB2 on iSeries OS/400. + + + The DB2400Dialect defaults the following configuration properties: + + + Property + Default Value + + + connection.driver_class + + + + + + + + An SQL dialect for DB2. + + + The DB2Dialect defaults the following configuration properties: + + + Property + Default Value + + + connection.driver_class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Summary description for FirebirdDialect. + + + The FirebirdDialect defaults the following configuration properties: + + + Property + Default Value + + + connection.driver_class + + + + + + + + + + + Does this dialect support distributed transaction? + + + As of v2.5 and 3.0.2, fails rollback-ing changes when distributed: changes are instead persisted in database. + (With ADO .Net Provider 5.9.1) + + + + + + + + ::= + EXTRACT FROM + + ::= + | + + + + ANSI-SQL substring + Documented in: + ANSI X3.135-1992 + American National Standard for Information Systems - Database Language - SQL + + + Syntax: + ::= + SUBSTRING FROM < start position> + [ FOR ] + ]]> + + + + + A SQLFunction implementation that emulates the ANSI SQL trim function + on dialects which do not support the full definition. However, this function + definition does assume the availability of ltrim, rtrim, and replace functions + which it uses in various combinations to emulate the desired ANSI trim() + functionality. + + + + + Default constructor. The target database has to support the replace function. + + + + + Constructor for supplying the name of the replace function to use. + + The replace function. + + + + + + + + + + according to both the ANSI-SQL and EJB3 specs, trim can either take + exactly one parameter or a variable number of parameters between 1 and 4. + from the SQL spec: + ::= + TRIM + + ::= + [ [ ] [ ] FROM ] + + ::= + LEADING + | TRAILING + | BOTH + ]]> + If only trim specification is omitted, BOTH is assumed; + if trim character is omitted, space is assumed + + + + + Treats bitwise operations as SQL function calls. + + + + + Creates an instance of this class using the provided function name. + + + The bitwise function name as defined by the SQL-Dialect. + + + + + + + + + + + + + + + + + Treats bitwise operations as native operations. + + + + + Creates an instance using the giving token. + + + The operation token. + + + Use this constructor only if the token DOES NOT represent an unary operator. + + + + + Creates an instance using the giving token and the flag indicating if it is an unary operator. + + The operation token. + Whether the operation is unary or not. + + + + + + + + + + + + + + + + ANSI-SQL style cast(foo as type) where the type is a NHibernate type + + + + + Emulation of locate() on Sybase + + + + + Initializes a new instance of the StandardSQLFunction class. + + SQL function name. + Whether the function accepts an asterisk (*) in place of arguments + + + + Initializes a new instance of the StandardSQLFunction class. + + SQL function name. + True if accept asterisk like argument + Return type for the function. + + + + Classic AVG sqlfunction that return types as it was done in Hibernate 3.1 + + + + + Classic COUNT sqlfunction that return types as it was done in Hibernate 3.1 + + + + + Classic SUM sqlfunction that return types as it was done in Hibernate 3.1 + + + + + Provides a substring implementation of the form substring(expr, start, length) + for SQL dialects where the length argument is mandatory. If this is called + from HQL with only two arguments, this implementation will generate the length + parameter as (len(expr) + 1 - start). + + + + + Initializes a new instance of the EmulatedLengthSubstringFunction class. + + + + + Provides support routines for the HQL functions as used + in the various SQL Dialects + + Provides an interface for supporting various HQL functions that are + translated to SQL. The Dialect and its sub-classes use this interface to + provide details required for processing of the function. + + + + + The function return type + + The type of the first argument + + + + + + Does this function have any arguments? + + + + + If there are no arguments, are parens required? + + + + + Render the function call as SQL. + + List of arguments + + SQL fragment for the function. + + + + Summary description for NoArgSQLFunction. + + + + + Emulation of coalesce() on Oracle, using multiple nvl() calls + + + + + Emulation of locate() on PostgreSQL + + + + + Find function by function name ignoring case + + + + + Represents HQL functions that can have different representations in different SQL dialects. + E.g. in HQL we can define function concat(?1, ?2) to concatenate two strings + p1 and p2. Target SQL function will be dialect-specific, e.g. (?1 || ?2) for + Oracle, concat(?1, ?2) for MySql, (?1 + ?2) for MS SQL. + Each dialect will define a template as a string (exactly like above) marking function + parameters with '?' followed by parameter's index (first index is 1). + + + + + Applies the template to passed in arguments. + + args function arguments + generated SQL function call + + + + + A template-based SQL function which substitutes required missing parameters with defaults. + + + + + Provides a standard implementation that supports the majority of the HQL + functions that are translated to SQL. + + + The Dialect and its sub-classes use this class to provide details required + for processing of the associated function. + + + + + Initializes a new instance of the StandardSafeSQLFunction class. + + SQL function name. + Exact number of arguments expected. + + + + Initializes a new instance of the StandardSafeSQLFunction class. + + SQL function name. + Return type for the function. + Exact number of arguments expected. + + + + Provides a standard implementation that supports the majority of the HQL + functions that are translated to SQL. + + + The Dialect and its sub-classes use this class to provide details required + for processing of the associated function. + + + + + Initializes a new instance of the StandardSQLFunction class. + + SQL function name. + + + + Initializes a new instance of the StandardSQLFunction class. + + SQL function name. + Return type for the function. + + + + A SQL function which substitutes required missing parameters with defaults. + + + + + + + + + + + + + + A HQL only cast for helping HQL knowing the type. Does not generates any actual cast in SQL code. + + + + + Support for slightly more general templating than StandardSQLFunction, + with an unlimited number of arguments. + + + + + + + + + + + + + + + + + + + + A generic SQL dialect which may or may not work on any actual databases + + + + + + + + + + + A SQL dialect for the SAP HANA column store + + + The HanaColumnStoreDialect defaults the following configuration properties: + + + Property + Default Value + + + connection.driver_class + + + + + + + + + + + + + + A SQL dialect base class for SAP HANA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A SQL dialect for the SAP HANA row store + + + The HanaRowStoreDialect defaults the following configuration properties: + + + Property + Default Value + + + connection.driver_class + + + + + + + + + + + + + + + + + + + + Extract the name of the violated constraint from the given DbException. + + The exception that was the result of the constraint violation. + The extracted constraint name. + + + + Summary description for InformixDialect. + This dialect is intended to work with IDS version 9.40 + + + The InformixDialect defaults the following configuration properties: + + + ConnectionDriver + NHibernate.Driver.OdbcDriver + PrepareSql + true + + + connection.driver_class + + + + + + + + + + Get the select command used retrieve the names of all sequences. + The select command; or null if sequences are not supported. + + + + Does this dialect support sequences? + + + + + Does this dialect support "pooled" sequences. Not aware of a better + name for this. Essentially can we specify the initial and increment values? + + True if such "pooled" sequences are supported; false otherwise. + + + + Generate the appropriate select statement to to retrieve the next value + of a sequence. + + the name of the sequence + String The "nextval" select string. + This should be a "stand alone" select statement. + + + + Generate the select expression fragment that will retrieve the next + value of a sequence as part of another (typically DML) statement. + + the name of the sequence + The "nextval" fragment. + + This differs from in that this + should return an expression usable within another statement. + + + + + Create a strategy responsible + for handling this dialect's variations in how joins are handled. + + This dialect's strategy. + + + + Does this Dialect have some kind of LIMIT syntax? + + False, unless overridden. + + + + Does this Dialect support an offset? + + + + + + + + Summary description for InformixDialect. + This dialect is intended to work with IDS version 10.00 + + + The InformixDialect defaults the following configuration properties: + + + ConnectionDriver + NHibernate.Driver.OdbcDriver + PrepareSql + true + + + connection.driver_class + + + + + + + + + + + Does this Dialect have some kind of LIMIT syntax? + + False, unless overridden. + + + + Does this Dialect support an offset? + + + + + Does this Dialect have some kind of LIMIT syntax? + + + False, unless overridden. + + + + + Can parameters be used for a statement containing a LIMIT? + + + + + Does this Dialect support an offset? + + + + + + + + + + + + + + + + + + + + Attempts to add a LIMIT clause to the given SQL SELECT. + Expects any database-specific offset and limit adjustments to have already been performed (ex. UseMaxForLimit, OffsetStartsAtOne). + + The to base the limit query off. + Offset of the first row to be returned by the query. This may be represented as a parameter, a string literal, or a null value if no limit is requested. This should have already been adjusted to account for OffsetStartsAtOne. + Maximum number of rows to be returned by the query. This may be represented as a parameter, a string literal, or a null value if no offset is requested. This should have already been adjusted to account for UseMaxForLimit. + + A new that contains the LIMIT clause. Returns null + if represents a SQL statement to which a limit clause cannot be added, + for example when the query string is custom SQL invoking a stored procedure. + + + + + + + + + + + + + + + + + An SQL dialect for IngresSQL. + + + The IngresDialect defaults the following configuration properties: + + + Property + Default Value + + + connection.driver_class + + + + + + + + + + + Use a parameter with ParameterDirection.Output + + + + + Use a parameter with ParameterDirection.ReturnValue + + + + + An SQL dialect compatible with Microsoft SQL Server 2000. + + + The MsSql2000Dialect defaults the following configuration properties: + + + Property + Default Value + + + connection.driver_class + + + + adonet.batch_size + 10 + + + query.substitutions + true 1, false 0, yes 'Y', no 'N' + + + + + + + + + + + + + + + + Generates the string to drop the table using SQL Server syntax. + + The name of the table to drop. + The SQL with the inserted. + + + + Does this Dialect have some kind of LIMIT syntax? + + True, we'll use the SELECT TOP nn syntax. + + + + Does this Dialect support an offset? + + + + + Can parameters be used for a statement containing a LIMIT? + + + + + Does the LIMIT clause take a "maximum" row number + instead of a total number of returned rows? + + false, unless overridden + + + + + + + MsSql does not require the OpenQuote to be escaped as long as the first char + is an OpenQuote. + + + + + Returns a string containing the query to check if an object exists + + The catalong name + The schema name + The table name + The name of the object + + + + + + + + On SQL Server there is a limit of 2100 parameters, but two are reserved for sp_executesql + and three for sp_prepexec (used when preparing is enabled). Set the number to 2097 + as the worst case scenario. + + + + http://stackoverflow.com/a/7264795/259946 + + + + Sql Server 2005 supports a query statement that provides LIMIT + functionality. + + true + + + + Sql Server 2005 supports a query statement that provides LIMIT + functionality with an offset. + + true + + + + Sql Server 2005 supports a query statement that provides LIMIT + functionality with an offset. + + false + + + + + + + We assume that applications using this dialect are using + SQL Server 2005 snapshot isolation modes. + + + + + We assume that applications using this dialect are using + SQL Server 2005 snapshot isolation modes. + + + + + Transforms a T-SQL SELECT statement into a statement that will - when executed - return a 'page' of results. The page is defined + by a page size ('limit'), and/or a starting page number ('offset'). + + + + + Returns a TSQL SELECT statement that will - when executed - return a 'page' of results. + + + + + + + + Should be preserved instead of switching it to ? + + + for preserving , for + replacing it with . + + + + + + + + + + + + + + An SQL dialect compatible with Microsoft SQL Server 7. + + + There have been no test run with this because the NHibernate team does not + have a machine with Sql 7 installed on it. But there have been users using + Ms Sql 7 with NHibernate. As issues with Ms Sql 7 and NHibernate become known + this Dialect will be updated. + + + + + Uses @@identity to get the Id value. + + + There is a well known problem with @@identity and triggers that insert into + rows into other tables that also use an identity column. The only way I know + of to get around this problem is to upgrade your database server to Ms Sql 2000. + + + + + A dialect for SQL Server Everywhere (SQL Server CE). + + + + + Does this dialect support concurrent writing connections in the same transaction? + + + + + + + + Does this dialect support pooling parameter in connection string? + + + + + + + + Does this dialect support distributed transaction? + + + Fails enlisting a connection into a distributed transaction, fails promoting a transaction + to distributed when it has already a connection enlisted. + + + + + + + + + + + A SQL dialect for MySQL + + + The MySQLDialect defaults the following configuration properties: + + + Property + Default Value + + + connection.driver_class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create the SQL string to drop a foreign key constraint. + + The name of the foreign key to drop. + The SQL string to drop the foreign key constraint. + + + + Create the SQL string to drop a primary key constraint. + + The name of the primary key to drop. + The SQL string to drop the primary key constraint. + + + + Create the SQL string to drop an index. + + The name of the index to drop. + The SQL string to drop the index constraint. + + + + Subclasses register a typename for the given type code, to be used in CAST() + statements. + + The typecode + The database type name + + + + Subclasses register a typename for the given type code, to be used in CAST() + statements. + + The typecode + + The database type name + + + + Get the name of the database type appropriate for casting operations + (via the CAST() SQL function) for the given typecode. + + The typecode + The database type name + + + + Does this dialect support concurrent writing connections in the same transaction? + + + NotSupportedException : Multiple simultaneous connections or connections with different + connection strings inside the same transaction are not currently supported. + + + + + + + + + + + Does this dialect support distributed transaction? + + + Fails enlisting a connection into a distributed transaction, fails promoting a transaction + to distributed when it has already a connection enlisted. + + + + + A dialect specifically for use with Oracle 10g. + + + The main difference between this dialect and + is the use of "ANSI join syntax" here... + + + + + A dialect specifically for use with Oracle 12c. + + + The main difference between this dialect and + is the use of "ANSI join syntax" here... + + + + + Oracle 12c supports a query statement that provides LIMIT + functionality with an offset. + + false + + + + A dialect for Oracle 8i. + + + + + Oracle has a dual Unicode support model. + Either the whole database use an Unicode encoding, and then all string types + will be Unicode. In such case, Unicode strings should be mapped to non N prefixed + types, such as Varchar2. This is the default. + Or N prefixed types such as NVarchar2 are to be used for Unicode strings. + This property is set according to + configuration parameter. + + + See https://docs.oracle.com/cd/B19306_01/server.102/b14225/ch6unicode.htm#CACHCAHF + https://docs.oracle.com/database/121/ODPNT/featOraCommand.htm#i1007557 + + + + + + + + Support for the oracle proprietary join syntax... + + The oracle join fragment + + + + Map case support to the Oracle DECODE function. Oracle did not + add support for CASE until 9i. + + The oracle CASE -> DECODE fragment + + + + Allows access to the basic + implementation... + + The mapping type + The appropriate select cluse fragment + + + + + + + + + + + + + + + + + + + It's a immature version, it just work. + An SQL dialect for Oracle Lite + + + The OracleLiteDialect defaults the following configuration properties: + + + Property + Default Value + + + connection.driver_class + + + + + + + + + + + + + + An SQL dialect for PostgreSQL 8.1 and above. + + + + PostgreSQL 8.1 supports FOR UPDATE ... NOWAIT syntax. + + + PostgreSQL supports Identity column using the "SERIAL" type. + Serial type is a "virtual" type that will automatically: + + + Create a sequence named tablename_colname_seq. + Set the default value of this column to the next value of the + sequence. (using function nextval('tablename_colname_seq')) + Add a "NOT NULL" constraint to this column. + Set the sequence as "owned by" the table. + + + To insert the next value of the sequence into the serial column, + exclude the column from the list of columns + in the INSERT statement or use the DEFAULT key word. + + + If the table or the column is dropped, the sequence is dropped too. + + + + + + + PostgreSQL supports Identity column using the "SERIAL" type. + + + + + PostgreSQL doesn't have type in identity column. + + + To create an identity column it uses the SQL syntax + CREATE TABLE tablename (colname SERIAL); or + CREATE TABLE tablename (colname BIGSERIAL); + + + + + PostgreSQL supports serial and serial4 type for 4 bytes integer auto increment column. + bigserial or serial8 can be used for 8 bytes integer auto increment column. + + bigserial if equal Int64, + serial otherwise + + + + The sql syntax to insert a row without specifying any column in PostgreSQL is + INSERT INTO table DEFAULT VALUES; + + + + + PostgreSQL 8.1 and above defined the function lastval() that returns the + value of the last sequence that nextval() was used on in the current session. + Call lastval() if nextval() has not yet been called in the current + session throw an exception. + + + + + + + + + + + An SQL dialect for PostgreSQL 8.2 and above. + + + PostgreSQL 8.2 supports DROP TABLE IF EXISTS tablename + and DROP SEQUENCE IF EXISTS sequencename syntax. + See for more information. + + + + + An SQL dialect for PostgreSQL 8.3 and above. + + + PostgreSQL 8.3 supports xml type + + + + + An SQL dialect for PostgreSQL. + + + The PostgreSQLDialect defaults the following configuration properties: + + + Property + Default Value + + + connection.driver_class + + + + + + + + Supported with SQL 2003 syntax since 7.4, released 2003-11-17. For older versions + we need to override GetCreateSequenceString(string, int, int) and provide alternative + syntax, but I don't think we need to bother for such ancient releases (considered EOL). + + + + + + + + + + PostgreSQL supports UNION ALL clause + + Reference: + PostgreSQL 8.0 UNION Clause documentation + + + + + PostgreSQL requires to cast NULL values to correctly handle UNION/UNION ALL + + See + PostgreSQL BUG #1847: Error in some kind of UNION query. + + The type code. + null casted as : "null::sqltypename" + + + + Should LOBs (both BLOB and CLOB) be bound using stream operations (i.e. + {@link java.sql.PreparedStatement#setBinaryStream}). + + True if BLOBs and CLOBs should be bound using stream operations. + + + + Does this dialect supports distributed transaction? false. + + + Npgsql since its version 3.2.5 version has race conditions: it fails handling the threading involved with + distributed transactions. This causes a bunch of distributed tests to be flaky with Npgsql. Individually, + they usually succeed, but run together, some of them fail. The trouble was not occuring with Npgsql 3.2.4.1. + + + + + + The SapSQLAnywhere17Dialect uses the SybaseSQLAnywhere12Dialect as its + base class. + The dialect defaults the following configuration properties: + + + Property + Default Value + + + connection.driver_class + + + + prepare_sql + + + + + + + + + SQL Anywhere does not supports null in unique constraints. As this disable generation of unique + constraints when a column is nullable, even if the application never put null in it, it could + be a breaking change. So this property is overriden to false only in this new 17 dialect. + + + + + Common implementation of schema reader. + + + This implementation of is based on the new of + .NET 2.0. + + + + + + Should be used for searching tables instead of using separately + the table, schema and catalog names? If , dialect must be provided + with . + + + + + This class is specific of NHibernate and supply DatabaseMetaData of Java. + In the .NET Framework, there is no direct equivalent. + + + Implementation is provide by a dialect. + + + + + In the Java language, this field indicates that the database treats mixed-case, + quoted SQL identifiers as case-insensitive and stores them in mixed case. + + + + + In the Java language, this field indicates that the database treats mixed-case, + quoted SQL identifiers as case-insensitive and stores them in upper case. + + + + + In the Java language, this field indicates that the database treats mixed-case, + unquoted SQL identifiers as case-insensitive and stores them in upper case. + + + + + In the Java language, this field indicates that the database treats mixed-case, + quoted SQL identifiers as case-insensitive and stores them in lower case. + + + + + In the Java language, this field indicates that the database treats mixed-case, + unquoted SQL identifiers as case-insensitive and stores them in lower case, + + + + + Gets a description of the tables available for the catalog + + A catalog, retrieves those without a catalog + Schema pattern, retrieves those without the schema + A table name pattern + a list of table types to include + Each row + + + + The name of the column that represent the TABLE_NAME in the + returned by . + + + + + Get the Table MetaData. + + The resultSet of . + Include FKs and indexes + + + + + Gets a description of the table columns available + + A catalog, retrieves those without a catalog + Schema pattern, retrieves those without the schema + A table name pattern + a column name pattern + A description of the table columns available + + + + Get a description of the given table's indices and statistics. + + A catalog, retrieves those without a catalog + Schema pattern, retrieves those without the schema + A table name pattern + A description of the table's indices available + The result is relative to the schema collections "Indexes". + + + + Get a description of the given table's indices and statistics. + + A catalog, retrieves those without a catalog + Schema pattern, retrieves those without the schema + A table name pattern + The name of the index + A description of the table's indices available + The result is relative to the schema collections "IndexColumns". + + + + Gets a description of the foreign keys available + + A catalog, retrieves those without a catalog + Schema name, retrieves those without the schema + A table name + A description of the foreign keys available + + + + Get all reserved words + + A set of reserved words + + + + Get a value from the DataRow. Multiple alternative column names can be given. + The names are tried in order, and the value from the first present column + is returned. + + + + + Get a string value from the DataRow. Multiple alternative column names can be given. + The names are tried in order, and the value from the first present column + is returned. + + + + + A SQL dialect for SQLite. + + +

+ Author: Ioan Bizau +

+
+
+ + + + + + + + SQLite does not currently support dropping foreign key constraints by alter statements. + This means that tables cannot be dropped if there are any rows that depend on those. + If there are cycles between tables, it would even be excessively difficult to delete + the data in the right order first. Because of this, we just turn off the foreign + constraints before we drop the schema and hope that we're not going to break anything. :( + We could theoretically check for data consistency afterwards, but we don't currently. + + + + + Does this dialect support concurrent writing connections? + + + As documented at https://www.sqlite.org/faq.html#q5 + + + + + Does this dialect supports distributed transaction? false. + + + SQLite does not have a two phases commit and as such does not respect distributed transaction semantic. + But moreover, it fails handling the threading involved with distributed transactions (see + https://system.data.sqlite.org/index.html/tktview/5cee5409f84da5f62172 ). + It has moreover some flakyness in tests due to seemingly highly delayed (> 500ms) commits when distributed. + + + + + + + + An SQL dialect for Sybase Adaptive Server Anywhere 9.0 + + +

+ This dialect probably will not work with schema-export. If anyone out there + can fill in the ctor with DbTypes to Strings that would be helpful. +

+ The dialect defaults the following configuration properties: + + + Property + Default Value + + + connection.driver_class + + + + prepare_sql + + + +
+
+ + + ASA does not require to drop constraint before dropping tables, and DROP statement + syntax used by Hibernate to drop constraint is not compatible with ASA, so disable it. + Comments matches SybaseAnywhereDialect from Hibernate-3.1 src + + + + + SQL Dialect for SQL Anywhere 11 - for the NHibernate 3.0.0 distribution + Copyright (C) 2010 Glenn Paulley + Contact: http://iablog.sybase.com/paulley + + This NHibernate dialect should be considered BETA software. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + The dialect defaults the following configuration properties: + + + Property + Default Value + + + connection.driver_class + + + + prepare_sql + + + + + + + + SQL Dialect for SQL Anywhere 12 - for the NHibernate 3.2.0 distribution + Copyright (C) 2011 Glenn Paulley + Contact: http://iablog.sybase.com/paulley + + This NHibernate dialect for SQL Anywhere 12 is a contribution to the NHibernate + open-source project. It is intended to be included in the NHibernate + distribution and is licensed under LGPL. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + The SybaseSQLAnywhere12Dialect uses the SybaseSQLAnywhere11Dialect as its + base class. SybaseSQLAnywhere12Dialect includes support for ISO SQL standard + sequences, which are defined in the catalog table SYSSEQUENCE. + The dialect uses the SybaseSQLAnywhe11MetaData class for metadata API + calls, which correctly supports reserved words defined by SQL Anywhere. + + The dialect defaults the following configuration properties: + + + Property + Default Value + + + connection.driver_class + + + + prepare_sql + + + + + + + + SQL Anywhere the ANSI standard "DEFAULT VALUES" since 11.0.1 release (not 11.0.0). + + + + + + + + + + + + + + SQL Anywhere supports SEQUENCES using a primarily SQL Standard + syntax. Sequence values can be queried using the .CURRVAL identifier, and the next + value in a sequence can be retrieved using the .NEXTVAL identifier. Sequences + are retained in the SYS.SYSSEQUENCE catalog table. + + + + + Pooled sequences does not refer to the CACHE parameter of the CREATE SEQUENCE + statement, but merely if the DBMS supports sequences that can be incremented or decremented + by values greater than 1. + + + + Get the SELECT command used to retrieve the names of all sequences. + The SELECT command; or NULL if sequences are not supported. + + + + This class maps a DbType to names. + + + Associations may be marked with a capacity. Calling the Get() + method with a type and actual size n will return the associated + name with smallest capacity >= n, if available and an unmarked + default type otherwise. + Eg, setting + + Names.Put(DbType, "TEXT" ); + Names.Put(DbType, 255, "VARCHAR($l)" ); + Names.Put(DbType, 65534, "LONGVARCHAR($l)" ); + + will give you back the following: + + Names.Get(DbType) // --> "TEXT" (default) + Names.Get(DbType,100) // --> "VARCHAR(100)" (100 is in [0:255]) + Names.Get(DbType,1000) // --> "LONGVARCHAR(1000)" (100 is in [256:65534]) + Names.Get(DbType,100000) // --> "TEXT" (default) + + On the other hand, simply putting + + Names.Put(DbType, "VARCHAR($l)" ); + + would result in + + Names.Get(DbType) // --> "VARCHAR($l)" (will cause trouble) + Names.Get(DbType,100) // --> "VARCHAR(100)" + Names.Get(DbType,1000) // --> "VARCHAR(1000)" + Names.Get(DbType,10000) // --> "VARCHAR(10000)" + + + + + + Get default type name for specified type + + the type key + the default type name associated with the specified key + + + + Get the type name specified type and size + + the type key + the SQL length + the SQL scale + the SQL precision + + The associated name with smallest capacity >= size (or precision for decimal, or scale for date time types) + if available, otherwise the default type name. + + + + + For types with a simple length (or precision for decimal, or scale for date time types), this method + returns the definition for the longest registered type. + + + + + + + Set a type name for specified type key and capacity + + the type key + the (maximum) type size/length, precision or scale + The associated name + + + + + + + + + + + Execute the given for each command of the resultset. + + The action to perform where the first parameter is the and the second parameter is the parameters offset of the . + + + + Datareader wrapper with the same life cycle of its command (through the batcher) + + + + + Get a data reader for this multiple result sets command. + + The timeout in seconds for the underlying ADO.NET query. + A cancellation token that can be used to cancel the work + A data reader. + + + + Get a data reader for this multiple result sets command. + + The timeout in seconds for the underlying ADO.NET query. + A data reader. + + + + Some Data Providers (ie - SqlClient) do not support Multiple Active Result Sets (MARS). + NHibernate relies on being able to create MARS to read Components and entities inside + of Collections. + + + This is a completely off-line DataReader - the underlying DbDataReader that was used to create + this has been closed and no connections to the Db exists. + + + + + Creates a NDataReader from a + + The to get the records from the Database. + if we are loading the in the middle of reading it. + A cancellation token that can be used to cancel the work + + NHibernate attempts to not have to read the contents of an into memory until it absolutely + has to. What that means is that it might have processed some records from the and will + pick up the midstream so that the underlying can be closed + so a new one can be opened. + + + + + Stores a Result from a DataReader in memory. + + + + + Initializes a new instance of the NResult class. + + The DbDataReader to populate the Result with. + + if the is already positioned on the record + to start reading from. + + A cancellation token that can be used to cancel the work + + + + Initializes a new instance of the NResult class. + + The DbDataReader to populate the Result with. + + if the is already positioned on the record + to start reading from. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Creates a NDataReader from a + + The to get the records from the Database. + if we are loading the in the middle of reading it. + + NHibernate attempts to not have to read the contents of an into memory until it absolutely + has to. What that means is that it might have processed some records from the and will + pick up the midstream so that the underlying can be closed + so a new one can be opened. + + + + + Sets the values that can be cached back to null and sets the + index of the cached column to -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + An implementation of that will work with either an + returned by Execute or with an + whose contents have been read into a . + + + + This allows NHibernate to use the underlying for as long as + possible without the need to read everything into the . + + + The consumer of the returned from does + not need to know the underlying reader and can use it the same even if it switches from an + to in the middle of its use. + + + + + + Initializes a new instance of the class. + + The underlying DbDataReader to use. + A cancellation token that can be used to cancel the work + + + + Initializes a new instance of the NHybridDataReader class. + + The underlying DbDataReader to use. + if the contents of the DbDataReader should be read into memory right away. + A cancellation token that can be used to cancel the work + + + + Reads all of the contents into memory because another + needs to be opened. + + A cancellation token that can be used to cancel the work + + This will result in a no op if the reader is closed or is already in memory. + + + + + Initializes a new instance of the class. + + The underlying DbDataReader to use. + + + + Initializes a new instance of the NHybridDataReader class. + + The underlying DbDataReader to use. + if the contents of the DbDataReader should be read into memory right away. + + + + Reads all of the contents into memory because another + needs to be opened. + + + This will result in a no op if the reader is closed or is already in memory. + + + + + Gets if the object is in the middle of reading a Result. + + if NextResult and Read have been called on the . + + + + + + + + + + + + + + + + + + + + + + + + + A flag to indicate if Disose() has been called. + + + + + Finalizer that ensures the object is correctly disposed of. + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + Indicates if this NHybridDataReader is being Disposed of or Finalized. + + If this NHybridDataReader is being Finalized (isDisposing==false) then make sure not + to call any methods that could potentially bring this NHybridDataReader back to life. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NHibernate driver for the Community CsharpSqlite data provider. +

+ Author: Nikolaos Tountas +

+
+ +

+ In order to use this Driver you must have the Community.CsharpSqlite.dll and Community.CsharpSqlite.SQLiteClient assemblies referenced. +

+

+ Please check http://code.google.com/p/csharp-sqlite/ for more information regarding csharp-sqlite. +

+
+
+ + + Initializes a new instance of . + + + Thrown when the Community.CsharpSqlite.dll assembly can not be loaded. + + + + + A NHibernate Driver for using the IBM.Data.DB2.iSeries DataProvider. + + + + + Initializes a new instance of the class. + + + Thrown when the IBM.Data.DB2.iSeries assembly can not be loaded. + + + + + A NHibernate Driver for using the IBM.Data.DB2.Core DataProvider. + + + + + A NHibernate Driver for using the IBM.Data.DB2 DataProvider. + + + + + A base for NHibernate Driver for using the IBM.Data.DB2 or IBM.Data.DB2.Core DataProvider. + + + + + + Thrown when the assemblyName assembly can not be loaded. + + + + + Gets a value indicating whether the driver [supports multiple queries]. + + + true if [supports multiple queries]; otherwise, false. + + + + + Gets the result sets command. + + The implementor of the session. + + + + + Provides a database driver for dotConnect for MySQL by DevArt. + + + + In order to use this driver you must have the assembly Devart.Data.MySql.dll available for + NHibernate to load, including its dependencies (Devart.Data.dll). + + + Please check the product's website + for any updates and/or documentation regarding dotConnect for MySQL. + + + + + + Initializes a new instance of the class. + + + Thrown when the Devart.Data.MySql assembly can not be loaded. + + + + + Devart.Data.MySql uses named parameters in the sql. + + - MySql uses @ in the sql. + + + + + + + Devart.Data.MySql use the @ to locate parameters in sql. + + @ is used to locate parameters in sql. + + + + Base class for the implementation of IDriver + + + + + Begin an ADO . + + The isolation level requested for the transaction. + The connection on which to start the transaction. + The started . + + + + Does this Driver require the use of a Named Prefix in the SQL statement. + + + For example, SqlClient requires select * from simple where simple_id = @simple_id + If this is false, like with the OleDb provider, then it is assumed that + the ? can be a placeholder for the parameter in the SQL statement. + + + + + Does this Driver require the use of the Named Prefix when trying + to reference the Parameter in the Command's Parameter collection. + + + This is really only useful when the UseNamedPrefixInSql == true. When this is true the + code will look like: + DbParameter param = cmd.Parameters["@paramName"] + if this is false the code will be + DbParameter param = cmd.Parameters["paramName"]. + + + + + The Named Prefix for parameters. + + + Sql Server uses "@" and Oracle uses ":". + + + + + Change the parameterName into the correct format DbCommand.CommandText + for the ConnectionProvider + + The unformatted name of the parameter + A parameter formatted for an DbCommand.CommandText + + + + Changes the parameterName into the correct format for an DbParameter + for the Driver. + + + For SqlServerConnectionProvider it will change id to @id + + The unformatted name of the parameter + A parameter formatted for an DbParameter. + + + + Does this Driver support DbCommand.Prepare(). + + + + A value of indicates that an exception would be thrown or the + company that produces the Driver we are wrapping does not recommend using + DbCommand.Prepare(). + + + A value of indicates that calling DbCommand.Prepare() will function + fine on this Driver. + + + + + + Generates an DbParameter for the DbCommand. It does not add the DbParameter to the DbCommand's + Parameter collection. + + The DbCommand to use to create the DbParameter. + The name to set for DbParameter.Name + The SqlType to set for DbParameter. + An DbParameter ready to be added to an DbCommand. + + + + Override to make any adjustments to the DbCommand object. (e.g., Oracle custom OUT parameter) + Parameters have been bound by this point, so their order can be adjusted too. + This is analogous to the RegisterResultSetOutParameter() function in Hibernate. + + + + + Override to make any adjustments to each DbCommand object before it added to the batcher. + + The command. + + This method is similar to the but, instead be called just before execute the command (that can be a batch) + is executed before add each single command to the batcher and before . + If you have to adjust parameters values/type (when the command is full filled) this is a good place where do it. + + + + + + + + + + + Begin an ADO . + + The driver. + The isolation level requested for the transaction. + The connection on which to start the transaction. + The started . + + + + A NHibernate Driver for using the Firebird data provider located in + FirebirdSql.Data.FirebirdClient assembly. + + + + + Initializes a new instance of the class. + + + Thrown when the FirebirdSql.Data.Firebird assembly can not be loaded. + + + + + Clears the connection pool. + + The connection string of connections for which to clear the pool. + null for clearing them all. + + + + This driver support of is not compliant and too heavily + restricts what can be done for NHibernate tests. See DNET-764, DNET-766 (and bonus, DNET-765). + + + + + DNET-764 + When auto-enlistment is enabled (Enlist=true in connection string), the driver throws if + attempting to open a connection without an ambient transaction. http://tracker.firebirdsql.org/browse/DNET-764 + + + + DNET-765 + When the connection string does not specify auto-enlistment parameter Enlist, the driver + defaults to false. http://tracker.firebirdsql.org/browse/DNET-765 + + + + DNET-766 + When auto-enlistment is disabled (Enlist=false in connection string), the driver ignores + calls to . They silently do + nothing, the Firebird connection does not get enlisted. http://tracker.firebirdsql.org/browse/DNET-766 + + + + + + + + . Enlistment is completely disabled when auto-enlistment is disabled. + See http://tracker.firebirdsql.org/browse/DNET-766. + + + + + Provides a database driver for the SAP HANA column store. + + + + In order to use this driver you must have the assembly Sap.Data.Hana.v4.5.dll available for + NHibernate to load, including its dependencies (libadonetHDB.dll and libSQLDBCHDB.dll + are required by the assembly Sap.Data.Hana.v4.5.dll as of the time of this writing). + + + Please check the product's website + for any updates and/or documentation regarding SAP HANA. + + + + + + Provides a database driver base class for SAP HANA. + + + + + Initializes a new instance of the class. + + + Thrown when the Sap.Data.Hana.v4.5 assembly can not be loaded. + + + + + + Named parameters are not supported by the SAP HANA .Net provider. + https://help.sap.com/viewer/0eec0d68141541d1b07893a39944924e/2.0.02/en-US/d197835a6d611014a07fd73ee6fed6eb.html + + + + + + + + + + + It does support it indeed, provided any previous transaction has finished completing. But scopes + are always promoted to distributed with HanaConnection, which causes them to complete on concurrent + threads. This creates race conditions with following a scope disposal. As this null enlistment feature + is here for attemptinng de-enlisting a connection from a completed transaction not yet cleaned-up, and as + HanaConnection does not handle such a case, better disable it. + + + + + Provides a database driver for the SAP HANA row store. + + + + In order to use this driver you must have the assembly Sap.Data.Hana.v4.5.dll available for + NHibernate to load, including its dependencies (libadonetHDB.dll and libSQLDBCHDB.dll + are required by the assembly Sap.Data.Hana.v4.5.dll as of the time of this writing). + + + Please check the product's website + for any updates and/or documentation regarding SAP HANA. + + + + + + + + + A strategy for describing how NHibernate should interact with the different .NET Data + Providers. + + + + The IDriver interface is not intended to be exposed to the application. + Instead it is used internally by NHibernate to obtain connection objects, command objects, and + to generate and prepare DbCommands. Implementors should provide a + public default constructor. + + + This is the interface to implement, or you can inherit from + if you have an ADO.NET data provider that NHibernate does not have built in support for. + To use the driver, NHibernate property connection.driver_class should be + set to the assembly-qualified name of the driver class. + + + key="connection.driver_class" + value="FullyQualifiedClassName, AssemblyName" + + + + + + Configure the driver using . + + + + + Creates an uninitialized DbConnection object for the specific Driver + + + + + Does this Driver support having more than 1 open DbDataReader with + the same DbConnection. + + + + A value of indicates that an exception would be thrown if NHibernate + attempted to have 2 DbDataReaders open using the same DbConnection. NHibernate + (since this version is a close to straight port of Hibernate) relies on the + ability to recursively open 2 DbDataReaders. If the Driver does not support it + then NHibernate will read the values from the DbDataReader into an . + + + A value of will result in greater performance because an DbDataReader can be used + instead of the . So if the Driver supports it then make sure + it is set to . + + + + + + Generates an DbCommand from the SqlString according to the requirements of the DataProvider. + + The of the command to generate. + The SqlString that contains the SQL. + The types of the parameters to generate for the command. + An DbCommand with the CommandText and Parameters fully set. + + + + Prepare the by calling . + May be a no-op if the driver does not support preparing commands, or for any other reason. + + The command. + + + + Generates an DbParameter for the DbCommand. It does not add the DbParameter to the DbCommand's + Parameter collection. + + The DbCommand to use to create the DbParameter. + The name to set for DbParameter.Name + The SqlType to set for DbParameter. + An DbParameter ready to be added to an DbCommand. + + + + Remove 'extra' parameters from the DbCommand + + + We sometimes create more parameters than necessary (see NH-2792 & also comments in SqlStringFormatter.ISqlStringVisitor.Parameter) + + + + + Expand the parameters of the cmd to have a single parameter for each parameter in the + sql string + + + This is for databases that do not support named parameters. So, instead of a single parameter + for 'select ... from MyTable t where t.Col1 = @p0 and t.Col2 = @p0' we can issue + 'select ... from MyTable t where t.Col1 = ? and t.Col2 = ?' + + + + + Make any adjustments to each DbCommand object before it is added to the batcher. + + The command. + + This method should be executed before add each single command to the batcher. + If you have to adjust parameters values/type (when the command is full filled) this is a good place where do it. + + + + + Does this driver mandates values for time? + + + + + Does this driver support ? + + + + + Does this driver connections support enlisting with a transaction? + + Enlisting with allows to leave a completed transaction and + starts accepting auto-committed statements. + + + + Does this driver connections support explicitly enlisting with a transaction when auto-enlistment + is disabled? + + + + + Does sometimes this driver finish distributed transaction after end of scope disposal? + + + See https://github.com/npgsql/npgsql/issues/1571#issuecomment-308651461 discussion with a Microsoft + employee: MSDTC considers a transaction to be committed once it has collected all participant votes + for committing from prepare phase. It then immediately notifies all participants of the outcome. + This causes TransactionScope.Dispose to leave while the second phase of participants may still + be executing. This means the transaction from the db view point can still be pending and not yet + committed after the scope disposal. This is by design of MSDTC and we have to cope with that. + Some data provider may have a global locking mechanism causing any subsequent use to wait for the + end of the commit phase, but this is not a general case. Some other, as Npgsql < v3.2.5, may + crash due to this, because they re-use the connection in the second phase. + + + + + The minimal date supplied as a supported by this driver. + + + + + A NHibernate Driver for using the Informix DataProvider + + + + + Initializes a new instance of the class. + + + Thrown when the IBM.Data.Informix assembly can not be loaded. + + + + + A NHibernate Driver for using the Ingres DataProvider + + + + + + + Provides a database driver for MySQL. + + + + In order to use this driver you must have the assembly MySql.Data.dll available for + NHibernate to load, including its dependencies (ICSharpCode.SharpZipLib.dll is required by + the assembly MySql.Data.dll as of the time of this writing). + + + Please check the product's website + for any updates and/or documentation regarding MySQL. + + + + + + Initializes a new instance of the class. + + + Thrown when the MySql.Data assembly can not be loaded. + + + + + MySql.Data uses named parameters in the sql. + + - MySql uses ? in the sql. + + + + + + + MySql.Data use the ? to locate parameters in sql. + + ? is used to locate parameters in sql. + + + + The MySql.Data driver does NOT support more than 1 open DbDataReader + with only 1 DbConnection. + + - it is not supported. + + + + MySql.Data does not support preparing of commands. + + - it is not supported. + + With the Gamma MySql.Data provider it is throwing an exception with the + message "Expected End of data packet" when a select command is prepared. + + + + + + + + The PostgreSQL data provider provides a database driver for PostgreSQL. +

+ Author: Oliver Weichhold +

+
+ +

+ In order to use this Driver you must have the Npgsql.dll Assembly available for + NHibernate to load it. +

+

+ Please check the products website + http://www.postgresql.org/ + for any updates and or documentation. +

+

+ The homepage for the .NET DataProvider is: + http://pgfoundry.org/projects/npgsql. +

+
+
+ + + Initializes a new instance of the class. + + + Thrown when the Npgsql assembly can not be loaded. + + + + + NH-2267 Patrick Earl + + + + + A NHibernate Driver for using the Odbc DataProvider + + + Always look for a native .NET DataProvider before using the Odbc DataProvider. + + + + + Depends on target DB in the Odbc case. This in facts depends on both the driver and the database. + + + + + + + + A NHibernate Driver for using the OleDb DataProvider + + + Always look for a native .NET DataProvider before using the OleDb DataProvider. + + + + + OLE DB provider does not support multiple open data readers + + + + + A NHibernate Driver for using the Oracle DataProvider. + + + + + A NHibernate Driver for using the Oracle.DataAccess (unmanaged) DataProvider + + + + + Initializes a new instance of . + + + Thrown when the Oracle.DataAccess assembly can not be loaded. + + + + + A NHibernate driver base for using ODP.Net. + + + Original code was contributed by James Mills + on the NHibernate forums in this + post. + + + + + Default constructor. + + The assembly name of the managed or unmanage driver. Namespaces will be derived from it. + + Thrown when the requested assembly can not be loaded. + + + + + + + + Oracle has a dual Unicode support model. + Either the whole database use an Unicode encoding, and then all string types + will be Unicode. In such case, Unicode strings should be mapped to non N prefixed + types, such as Varchar2. This is the default. + Or N prefixed types such as NVarchar2 are to be used for Unicode strings. + This property is set according to + configuration parameter. + + + See https://docs.oracle.com/cd/B19306_01/server.102/b14225/ch6unicode.htm#CACHCAHF + https://docs.oracle.com/database/121/ODPNT/featOraCommand.htm#i1007557 + + + + + + + + + + + + + + Add logic to ensure that a parameter is not created since + ODP.NET doesn't support it. Handle and cases too. + Adjust resulting type if needed. + + + + + A NHibernate Driver for using the Oracle.DataAccess.Lite DataProvider + + + + + Initializes a new instance of . + + + Thrown when the Oracle.DataAccess.Lite_w32 assembly can not be loaded. + + + + + This adds logic to ensure that a DbType.Boolean parameter is not created since + ODP.NET doesn't support it. + + + + + A NHibernate Driver for using the Oracle.ManagedDataAccess DataProvider + + + + + Initializes a new instance of . + + + Thrown when the Oracle.ManagedDataAccess assembly can not be loaded. + + + + + If the driver use a third party driver (not a .Net Framework DbProvider), its assembly version. + + + + + Initializes a new instance of with + type names that are loaded from the specified assembly. + + Assembly to load the types from. + Connection type name. + Command type name. + + + + Initializes a new instance of with + type names that are loaded from the specified assembly. + + The Invariant name of a provider. + Assembly to load the types from. + Connection type name. + Command type name. + + + + + + + A NHibernate Driver for using the SqlClient DataProvider + + + + http://stackoverflow.com/a/7264795/259946 + + + + Creates an uninitialized object for + the SqlClientDriver. + + An unitialized object. + + + + Creates an uninitialized object for + the SqlClientDriver. + + An unitialized object. + + + + MsSql requires the use of a Named Prefix in the SQL statement. + + + because MsSql uses "@". + + + + + MsSql requires the use of a Named Prefix in the Parameter. + + + because MsSql uses "@". + + + + + The Named Prefix for parameters. + + + Sql Server uses "@". + + + + + The SqlClient driver does NOT support more than 1 open DbDataReader + with only 1 DbConnection. + + - it is not supported. + + MS SQL Server 2000 (and 7) throws an exception when multiple DbDataReaders are + attempted to be opened. When SQL Server 2005 comes out a new driver will be + created for it because SQL Server 2005 is supposed to support it. + + + + + Interprets if a parameter is a Clob (for the purposes of setting its default size) + + The parameter + The of the parameter + True, if the parameter should be interpreted as a Clob, otherwise False + + + + Interprets if a parameter is a Clob (for the purposes of setting its default size) + + The parameter + The of the parameter + True, if the parameter should be interpreted as a Clob, otherwise False + + + + Interprets if a parameter is a Blob (for the purposes of setting its default size) + + The parameter + The of the parameter + True, if the parameter should be interpreted as a Blob, otherwise False + + + + With read committed snapshot or lower, SQL Server may have not actually already committed the transaction + right after the scope disposal. + + + + + + + + NHibernate driver for the System.Data.SQLite data provider for .NET. + + + + In order to use this driver you must have the System.Data.SQLite.dll assembly available + for NHibernate to load. This assembly includes the SQLite.dll or SQLite3.dll libraries. + + + You can get the System.Data.SQLite.dll assembly from + https://system.data.sqlite.org/ + + + Please check https://www.sqlite.org/ for more information regarding SQLite. + + + + + + Initializes a new instance of . + + + Thrown when the SQLite.NET assembly can not be loaded. + + + + + A NHibernate driver for Microsoft SQL Server CE data provider + + + + + Initializes a new instance of the class. + + + + + MsSql requires the use of a Named Prefix in the SQL statement. + + + because MsSql uses "@". + + + + + MsSql requires the use of a Named Prefix in the Parameter. + + + because MsSql uses "@". + + + + + The Named Prefix for parameters. + + + Sql Server uses "@". + + + + + The SqlClient driver does NOT support more than 1 open DbDataReader + with only 1 DbConnection. + + - it is not supported. + + Ms Sql 2000 (and 7) throws an Exception when multiple DataReaders are + attempted to be Opened. When Yukon comes out a new Driver will be + created for Yukon because it is supposed to support it. + + + + + . Enlistment is completely disabled when auto-enlistment is disabled. + does nothing in + this case. + + + + + + + + The SybaseAsaClientDriver driver provides a database driver for Adaptive Server Anywhere 9.0. + + + + + Initializes a new instance of the class. + + + Thrown when the iAnywhere.Data.AsaClient assembly is not and can not be loaded. + + + + + This provides a driver for Sybase ASE 15 using the ADO.NET 2 driver. + + + You will need the following libraries available to your application: +
    +
  • Sybase.AdoNet2.AseClient.dll
  • +
  • sybdrvado20.dll
  • +
+
+
+ + + Default constructor. + + + + + This provides a driver for Sybase ASE 15 using the ADO.NET 4 driver. + + + + + Default constructor. + + + + + This provides a driver for Sybase ASE 16 using the ADO.NET 4.5 driver. + + + + + Default constructor. + + + + + This provides a driver base for Sybase ASE 15 using the ADO.NET driver. (Also known as SAP + Adaptive Server Enterprise.) + + + ASE was formerly Sybase SQL Server, not to be confused with SQL Anywhere / ASA. + + + + + Initializes a new instance of with + type names that are loaded from the specified assembly. + + Assembly to load the types from. + + + + Initializes a new instance of with + type names that are loaded from the specified assembly. + + The Invariant name of a provider. + Assembly to load the types from. + Connection type name. + Command type name. + + + + + + + + + + + + + SQL Dialect for SQL Anywhere 12 - for the NHibernate 3.2.0 distribution + Copyright (C) 2011 Glenn Paulley + Contact: http://iablog.sybase.com/paulley + + This NHibernate dialect for SQL Anywhere 12 is a contribution to the NHibernate + open-source project. It is intended to be included in the NHibernate + distribution and is licensed under LGPL. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + The SybaseSQLAnywhereDotNet4Driver provides a .NET 4 database driver for + Sybase SQL Anywhere 12 using the versioned ADO.NET driver + iAnywhere.Data.SQLAnywhere.v4.0. + + + + + Initializes a new instance of the class. + + + Thrown when the iAnywhere.Data.SQLAnywhere.v4.0 assembly is not and can not be loaded. + + + + + The SybaseSQLAnywhereDriver Driver provides a database driver for Sybase SQL Anywhere 10 and above + + + + + Initializes a new instance of the class. + + + Thrown when the iAnywhere.Data.SQLAnywhere assembly is not and can not be loaded. + + + + + Responsible for maintaining the queue of actions related to events. + + The ActionQueue holds the DML operations queued as part of a session's + transactional-write-behind semantics. DML operations are queued here + until a flush forces them to be executed against the database. + + + + + + Perform all currently queued entity-insertion actions. + + A cancellation token that can be used to cancel the work + + + + Perform all currently queued actions. + + A cancellation token that can be used to cancel the work + + + + Prepares the internal action queues for execution. + + A cancellation token that can be used to cancel the work + + + + Execute any registered + + A cancellation token that can be used to cancel the work + + + + Performs cleanup of any held cache softlocks. + + Was the transaction successful. + A cancellation token that can be used to cancel the work + + + + Perform all currently queued entity-insertion actions. + + + + + Perform all currently queued actions. + + + + + Prepares the internal action queues for execution. + + + + + Execute any registered + + + + + Performs cleanup of any held cache softlocks. + + Was the transaction successful. + + + + Check whether the given tables/query-spaces are to be executed against + given the currently queued actions. + + The table/query-spaces to check. + True if we contain pending actions against any of the given tables; false otherwise. + + + + Check whether any insertion or deletion actions are currently queued. + + True if insertions or deletions are currently queued; false otherwise. + + + + A sorter aiming to group inserts as much as possible for optimizing batching. + + The list of inserts to optimize, already sorted in order to avoid constraint violations. + + + + Get a batch of uninitialized collection keys for a given role + + The persister for the collection role. + A key that must be included in the batch fetch + the maximum number of keys to return + A cancellation token that can be used to cancel the work + an array of collection keys, of length batchSize (padded with nulls) + + + + Get a batch of uninitialized collection keys for a given role + + The persister for the collection role. + A key that must be included in the batch fetch + the maximum number of keys to return + Whether to check the cache for uninitialized collection keys. + An array that will be filled with collection entries if set. + A cancellation token that can be used to cancel the work + An array of collection keys, of length (padded with nulls) + + + + Get a batch of unloaded identifiers for this class, using a slightly + complex algorithm that tries to grab keys registered immediately after + the given key. + + The persister for the entities being loaded. + The identifier of the entity currently demanding load. + The maximum number of keys to return + A cancellation token that can be used to cancel the work + an array of identifiers, of length batchSize (possibly padded with nulls) + + + + Get a batch of unloaded identifiers for this class, using a slightly + complex algorithm that tries to grab keys registered immediately after + the given key. + + The persister for the entities being loaded. + The identifier of the entity currently demanding load. + The maximum number of keys to return + Whether to check the cache for uninitialized keys. + A cancellation token that can be used to cancel the work + An array of identifiers, of length (possibly padded with nulls) + + + + Checks whether the given entity key indexes are cached. + + The list of pairs of entity keys and their indexes. + The array of indexes of that have to be checked. + The entity persister. + The batchable cache. + Whether to check the cache or just return for all keys. + A cancellation token that can be used to cancel the work + An array of booleans that contains the result for each key. + + + + Checks whether the given collection key indexes are cached. + + The list of pairs of collection entries and their indexes. + The array of indexes of that have to be checked. + The collection persister. + The batchable cache. + Whether to check the cache or just return for all keys. + A cancellation token that can be used to cancel the work + An array of booleans that contains the result for each key. + + + + Used to hold information about the entities that are currently eligible for batch-fetching. Ultimately + used by to build entity load batches. + + + A Map structure is used to segment the keys by entity type since loading can only be done for a particular entity + type at a time. + + + + + A map of subselect-fetch descriptors + keyed by the against which the descriptor is + registered. + + + + + The owning persistence context. + + + + + Constructs a queue for the given context. + + The owning persistence context. + + + + Clears all entries from this fetch queue. + + + + + Retrieve the fetch descriptor associated with the given entity key. + + The entity key for which to locate any defined subselect fetch. + The fetch descriptor; may return null if no subselect fetch queued for + this entity key. + + + + Adds a subselect fetch decriptor for the given entity key. + + The entity for which to register the subselect fetch. + The fetch descriptor. + + + + After evicting or deleting an entity, we don't need to + know the query that was used to load it anymore (don't + call this after loading the entity, since we might still + need to load its collections) + + + + + Clears all pending subselect fetches from the queue. + + + Called after flushing. + + + + + If an EntityKey represents a batch loadable entity, add + it to the queue. + + + Note that the contract here is such that any key passed in should + previously have been been checked for existence within the + ; failure to do so may cause the + referenced entity to be included in a batch even though it is + already associated with the . + + + + + After evicting or deleting or loading an entity, we don't + need to batch fetch it anymore, remove it from the queue + if necessary + + + + + If a CollectionEntry represents a batch loadable collection, add + it to the queue. + + + + + + + Retrives the uninitialized persistent collection from the queue. + + The collection persister. + The collection entry. + A persistent collection if found, otherwise. + + + + After a collection was initialized or evicted, we don't + need to batch fetch it anymore, remove it from the queue + if necessary + + + + + + Get a batch of uninitialized collection keys for a given role + + The persister for the collection role. + A key that must be included in the batch fetch + the maximum number of keys to return + an array of collection keys, of length batchSize (padded with nulls) + + + + Get a batch of uninitialized collection keys for a given role + + The persister for the collection role. + A key that must be included in the batch fetch + the maximum number of keys to return + Whether to check the cache for uninitialized collection keys. + An array that will be filled with collection entries if set. + An array of collection keys, of length (padded with nulls) + + + + Get a batch of unloaded identifiers for this class, using a slightly + complex algorithm that tries to grab keys registered immediately after + the given key. + + The persister for the entities being loaded. + The identifier of the entity currently demanding load. + The maximum number of keys to return + an array of identifiers, of length batchSize (possibly padded with nulls) + + + + Get a batch of unloaded identifiers for this class, using a slightly + complex algorithm that tries to grab keys registered immediately after + the given key. + + The persister for the entities being loaded. + The identifier of the entity currently demanding load. + The maximum number of keys to return + Whether to check the cache for uninitialized keys. + An array of identifiers, of length (possibly padded with nulls) + + + + Checks whether the given entity key indexes are cached. + + The list of pairs of entity keys and their indexes. + The array of indexes of that have to be checked. + The entity persister. + The batchable cache. + Whether to check the cache or just return for all keys. + An array of booleans that contains the result for each key. + + + + Checks whether the given collection key indexes are cached. + + The list of pairs of collection entries and their indexes. + The array of indexes of that have to be checked. + The collection persister. + The batchable cache. + Whether to check the cache or just return for all keys. + An array of booleans that contains the result for each key. + + + + Sorts the given keys by their indexes, where the keys that are after the demanded key will be located + at the start and the remaining indexes at the end of the returned array. + + The type of the key + The list of pairs of keys and their indexes. + The index of the demanded key + The index where the sorting will begin. + The index where the sorting will end. + An array of sorted key indexes. + + + + Delegate responsible, in conjunction with the various + , for implementing cascade processing. + + + + Cascade an action from the parent entity instance to all its children. + The parent's entity persister + The parent reference. + A cancellation token that can be used to cancel the work + + + + Cascade an action from the parent entity instance to all its children. This + form is typically called from within cascade actions. + + The parent's entity persister + The parent reference. + + Typically some form of cascade-local cache + which is specific to each CascadingAction type + + A cancellation token that can be used to cancel the work + + + Cascade an action to the child or children + + + Cascade an action to a collection + + + Cascade an action to a to-one association or any type + + + Cascade to the collection elements + + + Delete any entities that were removed from the collection + + + Cascade an action from the parent entity instance to all its children. + The parent's entity persister + The parent reference. + + + + Cascade an action from the parent entity instance to all its children. This + form is typically called from within cascade actions. + + The parent's entity persister + The parent reference. + + Typically some form of cascade-local cache + which is specific to each CascadingAction type + + + + Cascade an action to the child or children + + + Cascade an action to a collection + + + Cascade an action to a to-one association or any type + + + Cascade to the collection elements + + + Delete any entities that were removed from the collection + + + + A session action that may be cascaded from parent entity to its children + + + + Cascade the action to the child object. + The session within which the cascade is occurring. + The child to which cascading should be performed. + The child's entity name + Typically some form of cascade-local cache which is specific to each CascadingAction type + Are cascading deletes enabled. + A cancellation token that can be used to cancel the work + + + + Called (in the case of returning true) to validate + that no cascade on the given property is considered a valid semantic. + + The session within which the cascade is occurring. + The property value + The property value owner + The entity persister for the owner + The index of the property within the owner. + A cancellation token that can be used to cancel the work + + + Cascade the action to the child object. + The session within which the cascade is occurring. + The child to which cascading should be performed. + The child's entity name + Typically some form of cascade-local cache which is specific to each CascadingAction type + Are cascading deletes enabled. + + + + Given a collection, get an iterator of the children upon which the + current cascading action should be visited. + + The session within which the cascade is occurring. + The mapping type of the collection. + The collection instance. + The children iterator. + + + Does this action potentially extrapolate to orphan deletes? + True if this action can lead to deletions of orphans. + + + Does the specified cascading action require verification of no cascade validity? + True if this action requires no-cascade verification; false otherwise. + + + + Called (in the case of returning true) to validate + that no cascade on the given property is considered a valid semantic. + + The session within which the cascade is occurring. + The property value + The property value owner + The entity persister for the owner + The index of the property within the owner. + + + Should this action be performed (or noCascade consulted) in the case of lazy properties. + + + + Given a collection, get an iterator of all its children, loading them + from the database if necessary. + + The session within which the cascade is occurring. + The mapping type of the collection. + The collection instance. + The children iterator. + + + + Iterate just the elements of the collection that are already there. Don't load + any new elements from the database. + + + + + + + + + + + + + + + + + + + + + + + + + Execute persist during flush time + + + + + + + + We need an entry to tell us all about the current state + of a collection with respect to its persistent state + + + + + Determine if the collection is "really" dirty, by checking dirtiness + of the collection elements, if necessary + + + + + Prepares this CollectionEntry for the Flush process. + + The that this CollectionEntry will be responsible for flushing. + A cancellation token that can be used to cancel the work + + + session-start/post-flush persistent state + + + allow the snapshot to be serialized + + + + The when the Collection was loaded. + + + This can be if the Collection was not loaded by NHibernate and + was passed in along with a transient object. + + + + + The identifier of the Entity that is the owner of this Collection + during the load or post flush. + + + + + Indicates that the Collection can still be reached by an Entity + that exist in the . + + + It is also used to ensure that the Collection is not shared between + two Entities. + + + + + Indicates that the Collection has been processed and is ready + to have its state synchronized with the database. + + + + + Indicates that a Collection needs to be updated. + + + A Collection needs to be updated whenever the contents of the Collection + have been changed. + + + + + Indicates that a Collection has old elements that need to be removed. + + + A Collection needs to have removals performed whenever its role changes or + the key changes and it has a loadedPersister - ie - it was loaded by NHibernate. + + + + + Indicates that a Collection needs to be recreated. + + + A Collection needs to be recreated whenever its role changes + or the owner changes. + + + + + If we instantiate a collection during the + process, we must ignore it for the rest of the flush. + + + + + The that is currently responsible + for the Collection. + + + This is set when NHibernate is updating a reachable or an + unreachable collection. + + + + + Initializes a new instance of . + + + For newly wrapped collections, or dereferenced collection wrappers + + + + For collections just loaded from the database + + + + Initializes a new instance of for initialized detached collections. + + + For initialized detached collections + + + + + + + + + + + + + + Determine if the collection is "really" dirty, by checking dirtiness + of the collection elements, if necessary + + + + + Prepares this CollectionEntry for the Flush process. + + The that this CollectionEntry will be responsible for flushing. + + + + Updates the CollectionEntry to reflect that the + has been initialized. + + The initialized that this Entry is for. + + + + Updates the CollectionEntry to reflect that the + has been initialized. + + The initialized that this Entry is for. + + + + + Updates the CollectionEntry to reflect that it is has been successfully flushed to the database. + + The that was flushed. + + Called after a successful flush. + + + + + Sets the information in this CollectionEntry that is specific to the + . + + + The that is + responsible for the Collection. + + + + + Record the fact that this collection was dereferenced + + The collection to be updated by unreachability. + The session. + A cancellation token that can be used to cancel the work + + + + Initialize the role of the collection. + + The collection to be updated by reachability. + The type of the collection. + The owner of the collection. + The session. + A cancellation token that can be used to cancel the work + + + + Record the fact that this collection was dereferenced + + The collection to be updated by unreachability. + The session. + + + + Initialize the role of the collection. + + The collection to be updated by reachability. + The type of the collection. + The owner of the collection. + The session. + + + Algorithms related to foreign key constraint transparency + + + + Nullify all references to entities that have not yet + been inserted in the database, where the foreign key + points toward that entity + + + + + Return null if the argument is an "unsaved" entity (ie. + one with no existing database row), or the input argument + otherwise. This is how Hibernate avoids foreign key constraint + violations. + + + + + Determine if the object already exists in the database, using a "best guess" + + + + + Nullify all references to entities that have not yet + been inserted in the database, where the foreign key + points toward that entity + + + + + Return null if the argument is an "unsaved" entity (ie. + one with no existing database row), or the input argument + otherwise. This is how Hibernate avoids foreign key constraint + violations. + + + + + Determine if the object already exists in the database, using a "best guess" + + + + + Is this instance persistent or detached? + + + Hit the database to make the determination. + + + + + Is this instance, which we know is not persistent, actually transient? + Don't hit the database to make the determination, instead return null; + + + Don't hit the database to make the determination, instead return null; + + + + + Is this instance, which we know is not persistent, actually transient? + + + Hit the database to make the determination. + + + + + Return the identifier of the persistent or transient object, or throw + an exception if the instance is "unsaved" + + + Used by OneToOneType and ManyToOneType to determine what id value should + be used for an object that may or may not be associated with the session. + This does a "best guess" using any/all info available to use (not just the + EntityEntry). + + + + + Is this instance persistent or detached? + + + Hit the database to make the determination. + + + + + Is this instance, which we know is not persistent, actually transient? + Don't hit the database to make the determination, instead return null; + + + Don't hit the database to make the determination, instead return null; + + + + + Is this instance, which we know is not persistent, actually transient? + + + Hit the database to make the determination. + + + + + Return the identifier of the persistent or transient object, or throw + an exception if the instance is "unsaved" + + + Used by OneToOneType and ManyToOneType to determine what id value should + be used for an object that may or may not be associated with the session. + This does a "best guess" using any/all info available to use (not just the + EntityEntry). + + + + + Manages s and s + for an . + + +

+ Abstracts ADO.NET batching to maintain the illusion that a single logical batch + exists for the whole session, even when batching is disabled. + Provides transparent DbCommand caching. +

+

+ This will be useful once ADO.NET gets support for batching. Until that point + no code exists that will do batching, but this will provide a good point to do + error checking and making sure the correct number of rows were affected. +

+
+
+ + + Get a non-batchable an to use for inserting / deleting / updating. + Must be explicitly released by CloseCommand() + + The to convert to an . + The of the command. + The SqlTypes of parameters + in . + A cancellation token that can be used to cancel the work + + An that is ready to have the parameter values set + and then executed. + + + + + Get a batchable to use for inserting / deleting / updating + (might be called many times before a single call to ExecuteBatch() + + + After setting parameters, call AddToBatch() - do not execute the statement + explicitly. + + The to convert to an . + The of the command. + The SqlTypes of parameters + in . + A cancellation token that can be used to cancel the work + + + + + Add an insert / delete / update to the current batch (might be called multiple times + for a single PrepareBatchStatement()) + + Determines whether the number of rows affected by query is correct. + A cancellation token that can be used to cancel the work + + + + Execute the batch + + A cancellation token that can be used to cancel the work + + + + Gets an by calling ExecuteReader on the . + + The to execute to get the . + A cancellation token that can be used to cancel the work + The from the . + + The Batcher is responsible for ensuring that all of the Drivers rules for how many open + s it can have are followed. + + + + + Executes the . + + The to execute. + A cancellation token that can be used to cancel the work + The number of rows affected. + + The Batcher is responsible for ensuring that all of the Drivers rules for how many open + s it can have are followed. + + + + + Get an for using in loading / querying. + + The to convert to an . + The of the command. + The SqlTypes of parameters + in . + + An that is ready to be executed. + + + + If not explicitly released by , it will be + released when the session is closed or disconnected. + + + This does NOT add anything to the batch - it only creates the DbCommand and + does NOT cause the batch to execute... + + + + + + Get a non-batchable an to use for inserting / deleting / updating. + Must be explicitly released by CloseCommand() + + The to convert to an . + The of the command. + The SqlTypes of parameters + in . + + An that is ready to have the parameter values set + and then executed. + + + + + Close a opened using PrepareCommand() + + The to ensure is closed. + The to ensure is closed. + + + + Close a opened using + + The to ensure is closed. + + + + Get a batchable to use for inserting / deleting / updating + (might be called many times before a single call to ExecuteBatch() + + + After setting parameters, call AddToBatch() - do not execute the statement + explicitly. + + The to convert to an . + The of the command. + The SqlTypes of parameters + in . + + + + + Add an insert / delete / update to the current batch (might be called multiple times + for a single PrepareBatchStatement()) + + Determines whether the number of rows affected by query is correct. + + + + Execute the batch + + + + + Close any query statements that were left lying around + + + Use this method instead of Dispose if the + can be used again. + + + + + Gets an by calling ExecuteReader on the . + + The to execute to get the . + The from the . + + The Batcher is responsible for ensuring that all of the Drivers rules for how many open + s it can have are followed. + + + + + Executes the . + + The to execute. + The number of rows affected. + + The Batcher is responsible for ensuring that all of the Drivers rules for how many open + s it can have are followed. + + + + + Must be called when an exception occurs. + + + + + + Cancel the current query statement + + + + + Gets the value indicating whether there are any open resources + managed by this batcher (DbCommands or DbDataReaders). + + + + + Gets or sets the size of the batch, this can change dynamically by + calling the session's SetBatchSize. + + The size of the batch. + + + + Holds the state of the persistence context, including the + first-level cache, entries, snapshots, proxies, etc. + + + + + Get the current state of the entity as known to the underlying + database, or null if there is no corresponding row + + + + + Get the values of the natural id fields as known to the underlying + database, or null if the entity has no natural id or there is no + corresponding row. + + + + + Possibly unproxy the given reference and reassociate it with the current session. + + The reference to be unproxied if it currently represents a proxy. + A cancellation token that can be used to cancel the work + The unproxied instance. + + + + Force initialization of all non-lazy collections encountered during + the current two-phase load (actually, this is a no-op, unless this + is the "outermost" load) + + A cancellation token that can be used to cancel the work + + + + Get the session to which this persistence context is bound. + + + + + Retrieve this persistence context's managed load context. + + + + + Get the BatchFetchQueue, instantiating one if necessary. + + + + Retrieve the set of EntityKeys representing nullifiable references + + + Get the mapping from key value to entity instance + + + Get the mapping from entity instance to entity entry + + + Get the mapping from collection instance to collection entry + + + Get the mapping from collection key to collection instance + + + How deep are we cascaded? + + + Is a flush cycle currently in process? + Called before and after the flushcycle + + + + The read-only status for entities (and proxies) loaded into this persistence context. + + + + When a proxy is initialized, the loaded entity will have the same read-only + setting as the uninitialized proxy has, regardless of the persistence context's + current setting. + + + To change the read-only setting for a particular entity or proxy that is already + in the current persistence context, use . + + + + + + + Add a collection which has no owner loaded + + + + Get and remove a collection whose owner is not yet loaded, + when its owner is being loaded + + + + Clear the state of the persistence context + + + False if we know for certain that all the entities are read-only + + + Set the status of an entry + + + Called after transactions end + + + + Get the current state of the entity as known to the underlying + database, or null if there is no corresponding row + + + + + Retrieve the cached database snapshot for the requested entity key. + + The entity key for which to retrieve the cached snapshot + The cached snapshot + + + This differs from is two important respects: + no snapshot is obtained from the database if not already cached + an entry of NO_ROW here is interpreted as an exception + + + + + + Get the values of the natural id fields as known to the underlying + database, or null if the entity has no natural id or there is no + corresponding row. + + + + Add a canonical mapping from entity key to entity instance + + + + Get the entity instance associated with the given EntityKey + + + + Is there an entity with the given key in the persistence context + + + + Remove an entity from the session cache, also clear + up other state associated with the entity, all except + for the EntityEntry + + + + Get an entity cached by unique key + + + Add an entity to the cache by unique key + + + + Retrieve the EntityEntry representation of the given entity. + + The entity for which to locate the EntityEntry. + The EntityEntry for the given entity. + + + Remove an entity entry from the session cache + + + Is there an EntityEntry for this instance? + + + Get the collection entry for a persistent collection + + + Adds an entity to the internal caches. + + + + Generates an appropriate EntityEntry instance and adds it + to the event source's internal caches. + + + + Is the given collection associated with this persistence context? + + + Is the given proxy associated with this persistence context? + + + + Takes the given object and, if it represents a proxy, reassociates it with this event source. + + The possible proxy to be reassociated. + Whether the passed value represented an actual proxy which got initialized. + + + + If a deleted entity instance is re-saved, and it has a proxy, we need to + reset the identifier of the proxy + + + + + Get the entity instance underlying the given proxy, throwing + an exception if the proxy is uninitialized. If the given object + is not a proxy, simply return the argument. + + + + + Possibly unproxy the given reference and reassociate it with the current session. + + The reference to be unproxied if it currently represents a proxy. + The unproxied instance. + + + + Attempts to check whether the given key represents an entity already loaded within the + current session. + + The entity reference against which to perform the uniqueness check. + The entity key. + + + + If the existing proxy is insufficiently "narrow" (derived), instantiate a new proxy + and overwrite the registration of the old one. This breaks == and occurs only for + "class" proxies rather than "interface" proxies. Also init the proxy to point to + the given target implementation if necessary. + + The proxy instance to be narrowed. + The persister for the proxied entity. + The internal cache key for the proxied entity. + (optional) the actual proxied entity instance. + An appropriately narrowed instance. + + + + Return the existing proxy associated with the given EntityKey, or the + third argument (the entity associated with the key) if no proxy exists. Init + the proxy to the target implementation, if necessary. + + + + + Return the existing proxy associated with the given EntityKey, or the + argument (the entity associated with the key) if no proxy exists. + (slower than the form above) + + + + Get the entity that owns this persistent collection + + + Get the entity that owned this persistent collection when it was loaded + The persistent collection + + The owner if its entity ID is available from the collection's loaded key + and the owner entity is in the persistence context; otherwise, returns null + + + + Get the ID for the entity that owned this persistent collection when it was loaded + The persistent collection + the owner ID if available from the collection's loaded key; otherwise, returns null + + + add a collection we just loaded up (still needs initializing) + + + add a detached uninitialized collection + + + + Add a new collection (ie. a newly created one, just instantiated by the + application, with no database state or snapshot) + + The collection to be associated with the persistence context + + + + + add an (initialized) collection that was created by another session and passed + into update() (ie. one with a snapshot and existing state on the database) + + + + add a collection we just pulled out of the cache (does not need initializing) + + + Get the collection instance associated with the CollectionKey + + + + Register a collection for non-lazy loading at the end of the two-phase load + + + + + Force initialization of all non-lazy collections encountered during + the current two-phase load (actually, this is a no-op, unless this + is the "outermost" load) + + + + Get the PersistentCollection object for an array + + + Register a PersistentCollection object for an array. + Associates a holder with an array - MUST be called after loading + array, since the array instance is not created until endLoad(). + + + + + Remove the mapping of collection to holder during eviction of the owning entity + + + + Get the snapshot of the pre-flush collection state + + + + Get the collection entry for a collection passed to filter, + which might be a collection wrapper, an array, or an unwrapped + collection. Return null if there is no entry. + + + + Get an existing proxy by key + + + Add a proxy to the session cache + + + Remove a proxy from the session cache + + + Called before cascading + + + Called after cascading + + + Call this before beginning a two-phase load + + + Call this after finishing a two-phase load + + + + Search the persistence context for an owner for the child object, + given a collection role + + + + + Search the persistence context for an index of the child object, given a collection role + + + + + Record the fact that the association belonging to the keyed entity is null. + + + + Is the association property belonging to the keyed entity null? + + + + Change the read-only status of an entity (or proxy). + + + + Read-only entities can be modified, but changes are not persisted. They are not dirty-checked + and snapshots of persistent state are not maintained. + + + Immutable entities cannot be made read-only. + + + To set the default read-only setting for entities and proxies that are loaded + into the persistence context, see . + + + An entity (or ). + If true, the entity or proxy is made read-only; if false, it is made modifiable. + + + + + + Is the specified entity (or proxy) read-only? + + An entity (or ) + + true if the entity or proxy is read-only, otherwise false. + + + + + + Is in a two-phase load? + + + + Add child/parent relation to cache for cascading operations + + The child. + The parent. + + + + Remove child/parent relation from cache + + The child. + + + + Switch the session current cache mode. + + The session for which the cache mode has to be switched. + The desired cache mode. for not actually switching. + if no switch is required, otherwise an which + dispose will set the session cache mode back to its original value. + + + + Defines the internal contract between the Session and other parts of NHibernate + such as implementors of Type or ClassPersister + + + + + Initialize the collection (if not already initialized) + + + + A cancellation token that can be used to cancel the work + + + + Load an instance without checking if it was deleted. If it does not exist and isn't nullable, throw an exception. + This method may create a new proxy or return an existing proxy. + + The entityName (or class full name) to load. + The identifier of the object in the database. + Allow null instance + When enabled, the object is eagerly fetched. + A cancellation token that can be used to cancel the work + + A proxy of the object or an instance of the object if the persistentClass does not have a proxy. + + No object could be found with that id. + + + + Load an instance immediately. Do not return a proxy. + + + + A cancellation token that can be used to cancel the work + + + + + Execute a List() expression query + + + + A cancellation token that can be used to cancel the work + + + + + Strongly-typed version of + + + + + Strongly-typed version of + + + + + Execute an Iterate() query + + + + A cancellation token that can be used to cancel the work + + + + + Strongly-typed version of + + + + + Execute a filter + + + + + Execute a filter + + + + + Execute a filter (strongly-typed version). + + + + + Collection from a filter + + + + + Strongly-typed version of + + + + + Notify the session that the transaction is about to complete + + + + + + + A cancellation token that can be used to cancel the work + + + + Notify the session that the transaction completed, so we no longer own the old locks. + (Also we should release cache softlocks). May be called multiple times during the transaction + completion process. + + + + + Execute an SQL Query + + + + + Strongly-typed version of + + + + Execute an SQL Query + + + + Get the entity instance associated with the given Key, + calling the Interceptor if necessary + + + + Execute a native SQL update or delete query + + + Execute a HQL update or delete query + + + + Initialize the session after its construction was complete + + + + + Initialize the collection (if not already initialized) + + + + + + + Load an instance without checking if it was deleted. If it does not exist and isn't nullable, throw an exception. + This method may create a new proxy or return an existing proxy. + + The entityName (or class full name) to load. + The identifier of the object in the database. + Allow null instance + When enabled, the object is eagerly fetched. + + A proxy of the object or an instance of the object if the persistentClass does not have a proxy. + + No object could be found with that id. + + + + Load an instance immediately. Do not return a proxy. + + + + + + + + System time before the start of the transaction + + + + + + Get the creating SessionFactoryImplementor + + + + + + Get the prepared statement Batcher for this session + + + + + Execute a List() expression query + + + + + + + + Create a new instance of Query for the given query expression + A hibernate query expression + The query + + + + + Strongly-typed version of + + + + + Strongly-typed version of + + + + + Execute an Iterate() query + + + + + + + + Strongly-typed version of + + + + + Execute a filter + + + + + Execute a filter + + + + + Execute a filter (strongly-typed version). + + + + + Collection from a filter + + + + + Strongly-typed version of + + + + Get the for any instance + optional entity name + the entity instance + + + + Notify the session that an NHibernate transaction has begun. + + + + + Notify the session that the transaction is about to complete + + + + + + + + + + Notify the session that the transaction completed, so we no longer own the old locks. + (Also we should release cache softlocks). May be called multiple times during the transaction + completion process. + + + + + Return the identifier of the persistent object, or null if transient + + + + + Instantiate the entity class, initializing with the given identifier + + + + + Execute an SQL Query + + + + + Strongly-typed version of + + + + Execute an SQL Query + + + + Retrieve the currently set value for a filter parameter. + + The filter parameter name in the format + {FILTER_NAME.PARAMETER_NAME}. + The filter parameter value. + + + + Retrieve the type for a given filter parameter. + + The filter parameter name in the format + {FILTER_NAME.PARAMETER_NAME}. + The filter parameter type. + + + + Return the currently enabled filters. The filter map is keyed by filter + name, with values corresponding to the + instance. + + The currently enabled filters. + + + Retrieves the configured event listeners from this event source. + + + + Get the entity instance associated with the given Key, + calling the Interceptor if necessary + + + + Get the persistence context for this session + + + + Is the ISession still open? + + + + + Is the session connected? + + + if the session is connected. + + + A session is considered connected if there is a (regardless + of its state) or if the field connect is true. Meaning that it will connect + at the next operation that requires a connection. + + + + The best guess entity name for an entity not in an association + + + The guessed entity name for an entity not in an association + + + + Determine whether the session is closed. Provided separately from + IsOpen as this method does not attempt any system transaction sync + registration, whereas IsOpen is allowed to (does not currently, but may do + in a future version as it is the case in Hibernate); which makes this one + nicer to use for most internal purposes. + + + if the session is closed; otherwise. + + + + + Does this ISession have an active NHibernate transaction + or is there a system transaction in progress in which the session is enlisted? + + + + Execute a native SQL update or delete query + + + Execute a HQL update or delete query + + + + Join the system transaction. + + + + Sessions auto-join current transaction by default on their first usage within a scope. + This can be disabled with from + a session builder obtained with . + + + This method allows to explicitly join the current transaction. It does nothing if it is already + joined. + + + Thrown if there is no current transaction. + + + + Represents state associated with the processing of a given + in regards to loading collections. + + + Another implementation option to consider is to not expose ResultSets + directly (in the JDBC redesign) but to always "wrap" them and apply a [series of] context[s] to that wrapper. + + + + + Finish the process of collection-loading for this bound result set. Mainly this + involves cleaning up resources and notifying the collections that loading is + complete. + + The persister for which to complete loading. + A cancellation token that can be used to cancel the work + + + + Finish the process of collection-loading for this bound result set. Mainly this + involves cleaning up resources and notifying the collections that loading is + complete. + + The persister for which to complete loading. + Indicates if collection must not be put in cache. + A cancellation token that can be used to cancel the work + + + Add the collection to the second-level cache + The entry representing the collection to add + The persister + The action for handling cache batching + A cancellation token that can be used to cancel the work + + + + Creates a collection load context for the given result set. + + Callback to other collection load contexts. + The result set this is "wrapping". + + + + Retrieve the collection that is being loaded as part of processing this result set. + + The persister for the collection being requested. + The key of the collection being requested. + The loading collection (see discussion above). + + Basically, there are two valid return values from this method:
    +
  • an instance of {@link PersistentCollection} which indicates to + continue loading the result set row data into that returned collection + instance; this may be either an instance already associated and in the + midst of being loaded, or a newly instantiated instance as a matching + associated collection was not found.
  • +
  • null indicates to ignore the corresponding result set row + data relating to the requested collection; this indicates that either + the collection was found to already be associated with the persistence + context in a fully loaded state, or it was found in a loading state + associated with another result set processing context.
  • +
+
+
+ + + Finish the process of collection-loading for this bound result set. Mainly this + involves cleaning up resources and notifying the collections that loading is + complete. + + The persister for which to complete loading. + + + + Finish the process of collection-loading for this bound result set. Mainly this + involves cleaning up resources and notifying the collections that loading is + complete. + + The persister for which to complete loading. + Indicates if collection must not be put in cache. + + + Add the collection to the second-level cache + The entry representing the collection to add + The persister + The action for handling cache batching + + + + Maps to specific contextual data + related to processing that . + + + Implementation note: internally an is used to maintain + the mappings; was chosen because I'd rather not be + dependent upon potentially bad and + implementations. + Considering the JDBC-redesign work, would further like this contextual info + not mapped separately, but available based on the result set being processed. + This would also allow maintaining a single mapping as we could reliably get + notification of the result-set closing... + + + + Creates and binds this to the given persistence context. + The persistence context to which this will be bound. + + + + Retrieves the persistence context to which this is bound. + + + + + Release internal state associated with the given result set. + + The result set for which it is ok to release associated resources. + + This should be called when we are done with processing said result set, + ideally as the result set is being closed. + + + + Release internal state associated with *all* result sets. + + This is intended as a "failsafe" process to make sure we get everything + cleaned up and released. + + + + + Do we currently have any internal entries corresponding to loading + collections? + + True if we currently hold state pertaining to loading collections; false otherwise. + + + + Do we currently have any registered internal entries corresponding to loading + collections? + True if we currently hold state pertaining to a registered loading collections; false otherwise. + + + + + Get the {@link CollectionLoadContext} associated with the given + {@link ResultSet}, creating one if needed. + + The result set for which to retrieve the context. + The processing context. + + + + Attempt to locate the loading collection given the owner's key. The lookup here + occurs against all result-set contexts... + + The collection persister + The owner key + The loading collection, or null if not found. + + + + Register a loading collection xref. + + The xref collection key + The corresponding loading collection entry + + This xref map is used because sometimes a collection is in process of + being loaded from one result set, but needs to be accessed from the + context of another "nested" result set processing. + Implementation note: package protected, as this is meant solely for use + by {@link CollectionLoadContext} to be able to locate collections + being loaded by other {@link CollectionLoadContext}s/{@link ResultSet}s. + + + + + The inverse of {@link #registerLoadingCollectionXRef}. Here, we are done + processing the said collection entry, so we remove it from the + load context. + + The key of the collection we are done processing. + + The idea here is that other loading collections can now reference said + collection directly from the {@link PersistenceContext} because it + has completed its load cycle. + Implementation note: package protected, as this is meant solely for use + by {@link CollectionLoadContext} to be able to locate collections + being loaded by other {@link CollectionLoadContext}s/{@link ResultSet}s. + + + + + Locate the LoadingCollectionEntry within *any* of the tracked + s. + + The collection key. + The located entry; or null. + + Implementation note: package protected, as this is meant solely for use + by to be able to locate collections + being loaded by other s/ResultSets. + + + + + Represents a collection currently being loaded. + + + + Defines a query execution plan for an HQL query (or filter). + + + Defines a query execution plan for a native-SQL query. + + + + Extends an HQLQueryPlan to maintain a reference to the collection-role name + being filtered. + + + + Descriptor regarding a named parameter. + + + + Not supported yet (AST parse needed) + + + + Encapsulates metadata about parameters encountered within a query. + + + + The single available method + is responsible for parsing a query string and recognizing tokens in + relation to parameters (either named, ejb3-style, or ordinal) and + providing callbacks about such recognitions. + + + + + Performs the actual parsing and tokenizing of the query string making appropriate + callbacks to the given recognizer upon recognition of the various tokens. + + + Note that currently, this only knows how to deal with a single output + parameter (for callable statements). If we later add support for + multiple output params, this, obviously, needs to change. + + The string to be parsed/tokenized. + The thing which handles recognition events. + + + + + Implements a parameter parser recognizer specifically for the purpose + of journaling parameter locations. + + + + + Convenience method for creating a param location recognizer and + initiating the parse. + + The query to be parsed for parameter locations. + The generated recognizer, with journaled location info. + + + + The dictionary of named parameter locations. + The dictionary is keyed by parameter name. + + + + + The list of ordinal parameter locations. + + + The list elements are integers, representing the location for that given ordinal. + Thus OrdinalParameterLocationList[n] represents the location for the nth parameter. + + + + Acts as a cache for compiled query plans, as well as query-parameter metadata. + + + + + + + + + Describes a return in a native SQL query. + + + + Represents a return defined as part of a native sql query which + names a collection role in the form {classname}.{collectionrole}; it + is used in defining a custom sql query for loading an entity's + collection in non-fetching scenarios (i.e., loading the collection + itself as the "root" of the result). + + + + Construct a native-sql return representing a collection initializer + The result alias + + The entity-name of the entity owning the collection to be initialized. + + + The property name (on the owner) which represents + the collection to be initialized. + + Any user-supplied column->property mappings + The lock mode to apply to the collection. + + + + The class owning the collection. + + + + + The name of the property representing the collection from the . + + + + + Represents a return defined as part of a native sql query which + names a fetched role. + + + + Construct a return descriptor representing some form of fetch. + The result alias + The owner's result alias + The owner's property representing the thing to be fetched + Any user-supplied column->property mappings + The lock mode to apply + + + The alias of the owner of this fetched association. + + + + Retrieve the property name (relative to the owner) which maps to + the association to be fetched. + + + + + Represents the base information for a non-scalar return defined as part of + a native sql query. + + + + Constructs some form of non-scalar return descriptor + The result alias + Any user-supplied column->property mappings + The lock mode to apply to the return. + + + Retrieve the defined result alias + + + Retrieve the lock-mode to apply to this return + + + Retrieve the user-supplied column->property mappings. + + + + Represents a return defined as part of a native sql query which + names a "root" entity. A root entity means it is explicitly a + "column" in the result, as opposed to a fetched relationship or role. + + + + + Construct a return representing an entity returned at the root + of the result. + + The result alias + The entity name. + The lock mode to apply + + + + Construct a return representing an entity returned at the root + of the result. + + The result alias + The entity name. + Any user-supplied column->property mappings + The lock mode to apply + + + The name of the entity to be returned. + + + Describes a scalar return in a native SQL query. + + + + A represents the state of persistent "stuff" which + NHibernate is tracking. This includes persistent entities, collections, + as well as proxies generated. + + + There is meant to be a one-to-one correspondence between a SessionImpl and + a PersistentContext. The SessionImpl uses the PersistentContext to track + the current state of its context. Event-listeners then use the + PersistentContext to drive their processing. + + + + + Get the current state of the entity as known to the underlying + database, or null if there is no corresponding row + + + + + Get the values of the natural id fields as known to the underlying + database, or null if the entity has no natural id or there is no + corresponding row. + + + + + Possibly unproxy the given reference and reassociate it with the current session. + + The reference to be unproxied if it currently represents a proxy. + A cancellation token that can be used to cancel the work + The unproxied instance. + + + + Force initialization of all non-lazy collections encountered during + the current two-phase load (actually, this is a no-op, unless this + is the "outermost" load) + + A cancellation token that can be used to cancel the work + + + Constructs a PersistentContext, bound to the given session. + The session "owning" this context. + + + + Get the session to which this persistence context is bound. + + + + + Retrieve this persistence context's managed load context. + + + + + Get the BatchFetchQueue, instantiating one if necessary. + + + + Retrieve the set of EntityKeys representing nullifiable references + + + Get the mapping from key value to entity instance + + + Get the mapping from entity instance to entity entry + + + Get the mapping from collection instance to collection entry + + + Get the mapping from collection key to collection instance + + + How deep are we cascaded? + + + Is a flush cycle currently in process? + Called before and after the flushcycle + + + Add a collection which has no owner loaded + + + + Get and remove a collection whose owner is not yet loaded, + when its owner is being loaded + + + + Clear the state of the persistence context + + + False if we know for certain that all the entities are read-only + + + + + + Set the status of an entry + + + Called after transactions end + + + + Get the current state of the entity as known to the underlying + database, or null if there is no corresponding row + + + + + Retrieve the cached database snapshot for the requested entity key. + + The entity key for which to retrieve the cached snapshot + The cached snapshot + + + This differs from is two important respects: + no snapshot is obtained from the database if not already cached + an entry of NO_ROW here is interpreted as an exception + + + + + + Get the values of the natural id fields as known to the underlying + database, or null if the entity has no natural id or there is no + corresponding row. + + + + Add a canonical mapping from entity key to entity instance + + + + Get the entity instance associated with the given EntityKey + + + + Is there an entity with the given key in the persistence context + + + + Remove an entity from the session cache, also clear + up other state associated with the entity, all except + for the EntityEntry + + + + Get an entity cached by unique key + + + Add an entity to the cache by unique key + + + + Retrieve the EntityEntry representation of the given entity. + + The entity for which to locate the EntityEntry. + The EntityEntry for the given entity. + + + Remove an entity entry from the session cache + + + Is there an EntityEntry for this instance? + + + Get the collection entry for a persistent collection + + + Adds an entity to the internal caches. + + + + Generates an appropriate EntityEntry instance and adds it + to the event source's internal caches. + + + + Is the given collection associated with this persistence context? + + + Is the given proxy associated with this persistence context? + + + + Takes the given object and, if it represents a proxy, reassociates it with this event source. + + The possible proxy to be reassociated. + Whether the passed value represented an actual proxy which got initialized. + + + + If a deleted entity instance is re-saved, and it has a proxy, we need to + reset the identifier of the proxy + + + + + Associate a proxy that was instantiated by another session with this session + + The proxy initializer. + The proxy to reassociate. + + + + Get the entity instance underlying the given proxy, throwing + an exception if the proxy is uninitialized. If the given object + is not a proxy, simply return the argument. + + + + + Possibly unproxy the given reference and reassociate it with the current session. + + The reference to be unproxied if it currently represents a proxy. + The unproxied instance. + + + + Attempts to check whether the given key represents an entity already loaded within the + current session. + + The entity reference against which to perform the uniqueness check. + The entity key. + + + + If the existing proxy is insufficiently "narrow" (derived), instantiate a new proxy + and overwrite the registration of the old one. This breaks == and occurs only for + "class" proxies rather than "interface" proxies. Also init the proxy to point to + the given target implementation if necessary. + + The proxy instance to be narrowed. + The persister for the proxied entity. + The internal cache key for the proxied entity. + (optional) the actual proxied entity instance. + An appropriately narrowed instance. + + + + Return the existing proxy associated with the given EntityKey, or the + third argument (the entity associated with the key) if no proxy exists. Init + the proxy to the target implementation, if necessary. + + + + + Return the existing proxy associated with the given EntityKey, or the + argument (the entity associated with the key) if no proxy exists. + (slower than the form above) + + + + Get the entity that owns this persistent collection + + + Get the entity that owned this persistent collection when it was loaded + The persistent collection + + The owner, if its entity ID is available from the collection's loaded key + and the owner entity is in the persistence context; otherwise, returns null + + + + Get the ID for the entity that owned this persistent collection when it was loaded + The persistent collection + the owner ID if available from the collection's loaded key; otherwise, returns null + + + Get the ID for the entity that owned this persistent collection when it was loaded + The collection entry + the owner ID if available from the collection's loaded key; otherwise, returns null + + + add a collection we just loaded up (still needs initializing) + + + add a detached uninitialized collection + + + + Add a new collection (ie. a newly created one, just instantiated by the + application, with no database state or snapshot) + + The collection to be associated with the persistence context + + + + Add an collection to the cache, with a given collection entry. + The collection for which we are adding an entry. + The entry representing the collection. + The key of the collection's entry. + + + Add a collection to the cache, creating a new collection entry for it + The collection for which we are adding an entry. + The collection persister + + + + add an (initialized) collection that was created by another session and passed + into update() (ie. one with a snapshot and existing state on the database) + + + + add a collection we just pulled out of the cache (does not need initializing) + + + Get the collection instance associated with the CollectionKey + + + + Register a collection for non-lazy loading at the end of the two-phase load + + + + + Force initialization of all non-lazy collections encountered during + the current two-phase load (actually, this is a no-op, unless this + is the "outermost" load) + + + + Get the PersistentCollection object for an array + + + Register a PersistentCollection object for an array. + Associates a holder with an array - MUST be called after loading + array, since the array instance is not created until endLoad(). + + + + + Remove the mapping of collection to holder during eviction of the owning entity + + + + Get the snapshot of the pre-flush collection state + + + + Get the collection entry for a collection passed to filter, + which might be a collection wrapper, an array, or an unwrapped + collection. Return null if there is no entry. + + + + Get an existing proxy by key + + + Add a proxy to the session cache + + + Remove a proxy from the session cache + + + Called before cascading + + + Called after cascading + + + Call this before begining a two-phase load + + + Call this after finishing a two-phase load + + + + Search the persistence context for an owner for the child object, + given a collection role + + + + + Search the persistence context for an index of the child object, given a collection role + + + + + Record the fact that the association belonging to the keyed entity is null. + + + + Is the association property belonging to the keyed entity null? + + + + + + + + + + Allows work to be done outside the current transaction, by suspending it, + and performing work in a new transaction + + + + The work to be done + + + Suspend the current transaction and perform work in a new transaction + + + The work to be done + + + Suspend the current transaction and perform work in a new transaction + + + + Represents work that needs to be performed in a manner + which isolates it from any current application unit of + work transaction. + + + + + Perform the actual work to be done. + + The ADP connection to use. + The active transaction of the connection. + A cancellation token that can be used to cancel the work + + + + Perform the actual work to be done. + + The ADP connection to use. + The active transaction of the connection. + + + + Class which provides the isolation semantics required by + an . + + + + + Processing comes in two flavors: + + + + makes sure the work to be done is performed in a separate, distinct transaction + + + + makes sure the work to be done is performed outside the scope of any transaction + + + + + + + Ensures that all processing actually performed by the given work will + occur on a separate transaction. + + The work to be performed. + The session from which this request is originating. + A cancellation token that can be used to cancel the work + + + + Ensures that all processing actually performed by the given work will + occur outside of a transaction. + + The work to be performed. + The session from which this request is originating. + A cancellation token that can be used to cancel the work + + + + Ensures that all processing actually performed by the given work will + occur on a separate transaction. + + The work to be performed. + The session from which this request is originating. + + + + Ensures that all processing actually performed by the given work will + occur outside of a transaction. + + The work to be performed. + The session from which this request is originating. + + + + Functionality relating to Hibernate's two-phase loading process, + that may be reused by persisters that do not use the Loader + framework + + + + + Perform the second step of 2-phase load. Fully initialize the entity instance. + After processing a JDBC result set, we "resolve" all the associations + between the entities which were instantiated and had their state + "hydrated" into an array + + + + + Perform the second step of 2-phase load. Fully initialize the entity instance. + After processing a JDBC result set, we "resolve" all the associations + between the entities which were instantiated and had their state + "hydrated" into an array + + + + + Register the "hydrated" state of an entity instance, after the first step of 2-phase loading. + + Add the "hydrated state" (an array) of an uninitialized entity to the session. We don't try + to resolve any associations yet, because there might be other entities waiting to be + read from the JDBC result set we are currently processing + + + + + Perform the second step of 2-phase load. Fully initialize the entity instance. + After processing a JDBC result set, we "resolve" all the associations + between the entities which were instantiated and had their state + "hydrated" into an array + + + + + Perform the second step of 2-phase load. Fully initialize the entity instance. + After processing a JDBC result set, we "resolve" all the associations + between the entities which were instantiated and had their state + "hydrated" into an array + + + + + Add an uninitialized instance of an entity class, as a placeholder to ensure object + identity. Must be called before postHydrate(). + Create a "temporary" entry for a newly instantiated entity. The entity is uninitialized, + but we need the mapping from id to instance in order to guarantee uniqueness. + + + + + Utility methods for managing versions and timestamps + + + + + Increment the given version number + + The value of the current version. + The of the versioned property. + The current . + A cancellation token that can be used to cancel the work + Returns the next value for the version. + + + + Create an initial version number + + The of the versioned property. + The current . + A cancellation token that can be used to cancel the work + A seed value to initialize the versioned property with. + + + + Seed the given instance state snapshot with an initial version number + + An array of objects that contains a snapshot of a persistent object. + The index of the version property in the fields parameter. + The of the versioned property. + Force the version to initialize + The current session, if any. + A cancellation token that can be used to cancel the work + if the version property needs to be seeded with an initial value. + + + + Increment the given version number + + The value of the current version. + The of the versioned property. + The current . + Returns the next value for the version. + + + + Create an initial version number + + The of the versioned property. + The current . + A seed value to initialize the versioned property with. + + + + Seed the given instance state snapshot with an initial version number + + An array of objects that contains a snapshot of a persistent object. + The index of the version property in the fields parameter. + The of the versioned property. + Force the version to initialize + The current session, if any. + if the version property needs to be seeded with an initial value. + + + + Set the version number of the given instance state snapshot + + An array of objects that contains a snapshot of a persistent object. + The value the version should be set to in the fields parameter. + The that is responsible for persisting the values of the fields parameter. + + + + Get the version number of the given instance state snapshot + + An array of objects that contains a snapshot of a persistent object. + The that is responsible for persisting the values of the fields parameter. + + The value of the version contained in the fields parameter or null if the + Entity is not versioned. + + + + Do we need to increment the version number, given the dirty properties? + The array of property indexes which were deemed dirty + Were any collections found to be dirty (structurally changed) + An array indicating versionability of each property. + True if a version increment is required; false otherwise. + + + + Identifies a named association belonging to a particular + entity instance. Used to record the fact that an association + is null during loading. + + + + + The types of children to cascade to + + + + + A cascade point that occurs just after the insertion of the parent + entity and just before deletion + + + + + A cascade point that occurs just before the insertion of the parent entity + and just after deletion + + + + + A cascade point that occurs just after the insertion of the parent entity + and just before deletion, inside a collection + + + + + A cascade point that occurs just after the update of the parent entity + + + + A cascade point that occurs just before the session is flushed + + + + A cascade point that occurs just after eviction of the parent entity from the + session cache + + + + + A cascade point that occurs just after locking a transient parent entity into the + session cache + + + + + A cascade point that occurs just after locking a transient parent entity into the session cache + + + + + A cascade point that occurs just before merging from a transient parent entity into + the object in the session cache + + + + A contract for defining the aspects of cascading various persistence actions. + + + + package-protected constructor + + + For this style, should the given action be cascaded? + The action to be checked for cascade-ability. + True if the action should be cascaded under this style; false otherwise. + + + + Probably more aptly named something like doCascadeToCollectionElements(); + it is however used from both the collection and to-one logic branches... + + The action to be checked for cascade-ability. + True if the action should be really cascaded under this style; false otherwise. + + For this style, should the given action really be cascaded? The default + implementation is simply to return {@link #doCascade}; for certain + styles (currently only delete-orphan), however, we need to be able to + control this separately. + + + + Do we need to delete orphaned collection elements? + True if this style need to account for orphan delete operations; false otherwise. + + + Factory method for obtaining named cascade styles + The named cascade style name. + The appropriate CascadeStyle + + + save / delete / update / evict / lock / replicate / merge / persist + delete orphans + + + save / delete / update / evict / lock / replicate / merge / persist + + + save / update + + + lock + + + refresh + + + evict + + + replicate + + + merge + + + create + + + delete + + + delete + delete orphans + + + no cascades + + + + Uniquely identifies a collection instance in a particular session. + + + + + + + + We need an entry to tell us all about the current state + of an object with respect to its persistent state + + + + + Initializes a new instance of EntityEntry. + + The current of the Entity. + The snapshot of the Entity's state when it was loaded. + + The identifier of the Entity in the database. + The version of the Entity. + The for the Entity. + A boolean indicating if the Entity exists in the database. + The that is responsible for this Entity. + + + + + + Gets or sets the current of the Entity. + + The of the Entity. + + + + Gets or sets the of this Entity with respect to its + persistence in the database. + + The of this Entity. + + + + Gets or sets the identifier of the Entity in the database. + + The identifier of the Entity in the database if one has been assigned. + This might be when the is + and the database generates the id. + + + + Gets or sets the snapshot of the Entity when it was loaded from the database. + + The snapshot of the Entity. + + There will only be a value when the Entity was loaded in the current Session. + + + + + Gets or sets the snapshot of the Entity when it was marked as being ready for deletion. + + The snapshot of the Entity. + This will be if the Entity is not being deleted. + + + + Gets or sets a indicating if this Entity exists in the database. + + if it is already in the database. + + It can also be if it does not exists in the database yet and the + is . + + + + + Gets or sets the version of the Entity. + + The version of the Entity. + + + + Gets or sets the that is responsible for this Entity. + + The that is responsible for this Entity. + + + + Gets the Fully Qualified Name of the class this Entity is an instance of. + + The Fully Qualified Name of the class this Entity is an instance of. + + + + Get the EntityKey based on this EntityEntry. + + + + + After actually inserting a row, record the fact that the instance exists on the + database (needed for identity-column key generation) + + + + + After actually updating the database, update the snapshot information, + and escalate the lock mode. + + + + + After actually deleting a row, record the fact that the instance no longer + exists in the database + + + + + Can the entity be modified? + The entity is modifiable if all of the following are true: + - the entity class is mutable + - the entity is not read-only + - if the current status is Status.Deleted, then the entity was not read-only when it was deleted + + true, if the entity is modifiable; false, otherwise + + + + A globally unique identifier of an instance, consisting of the user-visible identifier + and the identifier space (eg. tablename) + + + + Construct a unique identifier for an entity class instance + + + Used to reconstruct an EntityKey during deserialization. + The identifier value + The root entity name + The specific entity name + The type of the identifier value + Whether represented entity is eligible for batch loading + The session factory + + + + + + + Used to uniquely key an entity instance in relation to a particular session + by some unique property reference, as opposed to identifier. + Unique information consists of the entity-name, the referenced + property name, and the referenced property value. + + + + + + + + + A FilterDefinition defines the global attributes of a dynamic filter. This + information includes its name as well as its defined parameters (name and type). + + + + + Set the named parameter's value list for this filter. + + The name of the filter for which this configuration is in effect. + The default filter condition. + A dictionary storing the NHibernate type + of each parameter under its name. + if set to true used in many to one rel + + + + Gets a value indicating whether to use this filter-def in manytoone refs. + + true if [use in many to one]; otherwise, false. + + + + Get the name of the filter this configuration defines. + + The filter name for this configuration. + + + + Get a set of the parameters defined by this configuration. + + The parameters named by this configuration. + + + + Retrieve the type of the named parameter defined for this filter. + + The name of the filter parameter for which to return the type. + The type of the named parameter. + + + + A strategy for determining if an identifier value is an identifier of a new + transient instance or a previously persistent transient instance. The strategy + is determined by the Unsaved-Value attribute in the mapping file. + + + + + + + + Assume the transient instance is newly instantiated if its identifier is null or + equal to Value + + + + + + Does the given identifier belong to a new instance + + + + + Always assume the transient instance is newly instantiated + + + + + Never assume that transient instance is newly instantiated + + + + + Assume the transient instance is newly instantiated if the identifier + is null. + + + + Assume nothing. + + + + Defines operations common to "compiled" mappings (ie. SessionFactory) and + "uncompiled" mappings (ie Configuration that are used by implementors of IType + + + + + The current . + + + + + Defines the internal contract between the ISessionFactory and other parts of NHibernate + such as implementors of IType. + + + + + Get the used. + + + + The cache of table update timestamps + + + Statistics SPI + + + Retrieves the SQLExceptionConverter in effect for this SessionFactory. + The SQLExceptionConverter for this SessionFactory. + + + + Get the persister for the named entity + + The name of the entity that is persisted. + The for the entity. + If no can be found. + + + + Get the persister object for a collection role + + + + + + + Get the return types of a query + + + + + + Get the return aliases of a query + + + + Get the names of all persistent classes that implement/extend the given interface/class + + The entity-name, the class name or full name, the imported class name. + All implementors class names. + + + + Get a class name, using query language imports + + + + + + + Get the default query cache + + + + + Get a particular named query cache, or the default cache + + the name of the cache region, or null for the default + query cache + the existing cache, or a newly created cache if none by that + region name + + + + Gets the hql query identified by the name. + + The name of that identifies the query. + + A hql query or if the named + query does not exist. + + + + + Get the identifier generator for the hierarchy + + + + Get a named second-level cache region + + + + Open a session conforming to the given parameters. Used mainly + for current session processing. + + The external ado.net connection to use, if one (i.e., optional). + No usage. + Not yet implemented. + The release mode for managed jdbc connections. + An appropriate session. + + + + Retrieves a set of all the collection roles in which the given entity + is a participant, as either an index or an element. + + The entity name for which to get the collection roles. + + Set of all the collection roles in which the given entityName participates. + + + + + Gets the ICurrentSessionContext instance attached to this session factory. + + + + + Get the persister for the named entity + + The name of the entity that is persisted. + + The for the entity or is the name was not found. + + + + + Get the entity-name for a given mapped class. + + the mapped class + the entity name where available or null + + + + Get the columns of the associated table which are to + be used in the join + + + + + Get the aliased columns of the owning entity which are to + be used in the join + + + + + Get the columns of the owning entity which are to + be used in the join + + + + + Implements the algorithm for validating property values + for illegal null values + + + + + Check nullability of the class persister properties + + entity properties + class persister + whether it is intended to be updated or saved + + + + Check sub elements-nullability. Returns property path that break + nullability or null if none + + type to check + value to check + property path + + + + Check component nullability. Returns property path that break + nullability or null if none + + component properties + component not-nullable type + property path + + + + Return a well formed property path. + Basically, it will return parent.child + + parent in path + child in path + parent-child path + + + + Container for data that is used during the NHibernate query/load process. + + + + + Gets or sets an array of objects that is stored at the index + of the Parameter. + + + + + Gets or sets an array of objects that is stored at the index + of the Parameter. + + + + + Gets or sets the for the Query. + + + + + Gets or sets an that contains the alias name of the + object from hql as the key and the as the value. + + An of lock modes. + + + + Ensure the Types and Values are the same length. + + + If the Lengths of and + are not equal. + + + + + Information to determine how to run an DbCommand and what + records to return from the DbDataReader. + + + + + Indicates that the no value has been set on the Property. + + + + + Gets or Sets the Index of the First Row to Select + + The Index of the First Rows to Select + Defaults to 0 unless specifically set. + + + + Gets or Sets the Maximum Number of Rows to Select + + The Maximum Number of Rows to Select + Defaults to NoValue unless specifically set. + + + + The timeout in seconds for the underlying ADO.NET query. + + The query timeout in seconds. + Defaults to unless specifically set. + + + + Represents the status of an entity with respect to + this session. These statuses are for internal + book-keeping only and are not intended to represent + any notion that is visible to the application. + + + + + The Entity is snapshotted in the Session with the same state as the database + (called Managed in H3). + + + + + The Entity is in the Session and has been marked for deletion but not + deleted from the database yet. + + + + + The Entity has been deleted from database. + + + + + The Entity is in the process of being loaded. + + + + + The Entity is in the process of being saved. + + + + + The entity is read-only. + + + + An ordered pair of a value and its Hibernate type. + + + + Constructor for typed value that may represent a simple value or a list value (for a parameter list). + If knowing what is value, use instead. + + The type of the value (or of its elements if it is a list value) + The value. + The logic for infering if the value should be considered as a list value is minimal and will not + catch all cases, like hashset. + + + + Construct a typed value. + + The type of the value (or of its elements if it is a list value) + The value. + if the value is a list value (for a parameter list), + otherwise. + + + + Return an IdentifierValue for the specified unsaved-value. If none is specified, + guess the unsaved value by instantiating a test instance of the class and + reading it's id property, or if that is not possible, using the java default + value for the type + + + + + An enum of the different ways a value might be "included". + + + This is really an expanded true/false notion with Partial being the + expansion. Partial deals with components in the cases where + parts of the referenced component might define inclusion, but the + component overall does not. + + + + + A strategy for determining if a version value is an version of + a new transient instance or a previously persistent transient instance. + The strategy is determined by the Unsaved-Value attribute in the mapping file. + + + + + + + + Assume the transient instance is newly instantiated if its version is null or + equal to Value + + + + + + Does the given identifier belong to a new instance + + + + + Assume the transient instance is newly instantiated if the version + is null, otherwise assume it is a detached instance. + + + + + Assume the transient instance is newly instantiated if the version + is null, otherwise defer to the identifier unsaved-value. + + + + + Assume the transient instance is newly instantiated if the identifier + is null. + + + + + A convenience base class for listeners whose functionality results in flushing. + + + + + Coordinates the processing necessary to get things ready for executions + as db calls by preparing the session caches and moving the appropriate + entities and collections to their respective execution queues. + + The flush event. + A cancellation token that can be used to cancel the work + + + + Execute all SQL and second-level cache updates, in a + special order so that foreign-key constraints cannot + be violated: + + Inserts, in the order they were performed + Updates + Deletion of collection elements + Insertion of collection elements + Deletes, in the order they were performed + + + The session being flushed + A cancellation token that can be used to cancel the work + + + + Coordinates the processing necessary to get things ready for executions + as db calls by preparing the session caches and moving the appropriate + entities and collections to their respective execution queues. + + The flush event. + + + + Execute all SQL and second-level cache updates, in a + special order so that foreign-key constraints cannot + be violated: + + Inserts, in the order they were performed + Updates + Deletion of collection elements + Insertion of collection elements + Deletes, in the order they were performed + + + The session being flushed + + + + 1. Recreate the collection key -> collection map + 2. rebuild the collection entries + 3. call Interceptor.postFlush() + + + + + A convenience base class for listeners that respond to requests to perform a + pessimistic lock upgrade on an entity. + + + + + Performs a pessimistic lock upgrade on a given entity, if needed. + + The entity for which to upgrade the lock. + The entity's EntityEntry instance. + The lock mode being requested for locking. + The session which is the source of the event being processed. + A cancellation token that can be used to cancel the work + + + + Performs a pessimistic lock upgrade on a given entity, if needed. + + The entity for which to upgrade the lock. + The entity's EntityEntry instance. + The lock mode being requested for locking. + The session which is the source of the event being processed. + + + + A convenience base class for listeners that respond to requests to reassociate an entity + to a session ( such as through lock() or update() ). + + + + + Associates a given entity (either transient or associated with another session) to the given session. + + The event triggering the re-association + The entity to be associated + The id of the entity. + The entity's persister instance. + A cancellation token that can be used to cancel the work + An EntityEntry representing the entity within this session. + + + + Associates a given entity (either transient or associated with another session) to the given session. + + The event triggering the re-association + The entity to be associated + The id of the entity. + The entity's persister instance. + An EntityEntry representing the entity within this session. + + + + A convenience bas class for listeners responding to save events. + + + + + Prepares the save call using the given requested id. + + The entity to be saved. + The id to which to associate the entity. + The name of the entity being saved. + Generally cascade-specific information. + The session which is the source of this save event. + A cancellation token that can be used to cancel the work + The id used to save the entity. + + + + Prepares the save call using a newly generated id. + + The entity to be saved + The entity-name for the entity to be saved + Generally cascade-specific information. + The session which is the source of this save event. + + does the event context require + access to the identifier immediately after execution of this method (if + not, post-insert style id generators may be postponed if we are outside + a transaction). + + A cancellation token that can be used to cancel the work + + The id used to save the entity; may be null depending on the + type of id generator used and the requiresImmediateIdAccess value + + + + + Prepares the save call by checking the session caches for a pre-existing + entity and performing any lifecycle callbacks. + + The entity to be saved. + The id by which to save the entity. + The entity's persister instance. + Is an identity column being used? + Generally cascade-specific information. + The session from which the event originated. + + does the event context require + access to the identifier immediately after execution of this method (if + not, post-insert style id generators may be postponed if we are outside + a transaction). + + A cancellation token that can be used to cancel the work + + The id used to save the entity; may be null depending on the + type of id generator used and the requiresImmediateIdAccess value + + + + + Performs all the actual work needed to save an entity (well to get the save moved to + the execution queue). + + The entity to be saved + The id to be used for saving the entity (or null, in the case of identity columns) + The entity's persister instance. + Should an identity column be used for id generation? + Generally cascade-specific information. + The session which is the source of the current event. + + Is access to the identifier required immediately + after the completion of the save? persist(), for example, does not require this... + + A cancellation token that can be used to cancel the work + + The id used to save the entity; may be null depending on the + type of id generator used and the requiresImmediateIdAccess value + + + + + Perform any property value substitution that is necessary + (interceptor callback, version initialization...) + + The entity + The entity identifier + The snapshot entity state + The entity persister + The originating session + A cancellation token that can be used to cancel the work + + True if the snapshot state changed such that + reinjection of the values into the entity is required. + + + + Handles the calls needed to perform pre-save cascades for the given entity. + The session from which the save event originated. + The entity's persister instance. + The entity to be saved. + Generally cascade-specific data + A cancellation token that can be used to cancel the work + + + Handles to calls needed to perform post-save cascades. + The session from which the event originated. + The entity's persister instance. + The entity being saved. + Generally cascade-specific data + A cancellation token that can be used to cancel the work + + + + Determine whether the entity is persistent, detached, or transient + + The entity to check + The name of the entity + The entity's entry in the persistence context + The originating session. + A cancellation token that can be used to cancel the work + The state. + + + + After the save, will te version number be incremented + if the instance is modified? + + True if the version will be incremented on an entity change after save; false otherwise. + + + + Prepares the save call using the given requested id. + + The entity to be saved. + The id to which to associate the entity. + The name of the entity being saved. + Generally cascade-specific information. + The session which is the source of this save event. + The id used to save the entity. + + + + Prepares the save call using a newly generated id. + + The entity to be saved + The entity-name for the entity to be saved + Generally cascade-specific information. + The session which is the source of this save event. + + does the event context require + access to the identifier immediately after execution of this method (if + not, post-insert style id generators may be postponed if we are outside + a transaction). + + + The id used to save the entity; may be null depending on the + type of id generator used and the requiresImmediateIdAccess value + + + + + Prepares the save call by checking the session caches for a pre-existing + entity and performing any lifecycle callbacks. + + The entity to be saved. + The id by which to save the entity. + The entity's persister instance. + Is an identity column being used? + Generally cascade-specific information. + The session from which the event originated. + + does the event context require + access to the identifier immediately after execution of this method (if + not, post-insert style id generators may be postponed if we are outside + a transaction). + + + The id used to save the entity; may be null depending on the + type of id generator used and the requiresImmediateIdAccess value + + + + + Performs all the actual work needed to save an entity (well to get the save moved to + the execution queue). + + The entity to be saved + The id to be used for saving the entity (or null, in the case of identity columns) + The entity's persister instance. + Should an identity column be used for id generation? + Generally cascade-specific information. + The session which is the source of the current event. + + Is access to the identifier required immediately + after the completion of the save? persist(), for example, does not require this... + + + The id used to save the entity; may be null depending on the + type of id generator used and the requiresImmediateIdAccess value + + + + + Perform any property value substitution that is necessary + (interceptor callback, version initialization...) + + The entity + The entity identifier + The snapshot entity state + The entity persister + The originating session + + True if the snapshot state changed such that + reinjection of the values into the entity is required. + + + + Handles the calls needed to perform pre-save cascades for the given entity. + The session from which the save event originated. + The entity's persister instance. + The entity to be saved. + Generally cascade-specific data + + + Handles to calls needed to perform post-save cascades. + The session from which the event originated. + The entity's persister instance. + The entity being saved. + Generally cascade-specific data + + + + Determine whether the entity is persistent, detached, or transient + + The entity to check + The name of the entity + The entity's entry in the persistence context + The originating session. + The state. + + + + Abstract superclass of algorithms that walk a tree of property values of an entity, and + perform specific functionality for collections, components and associated entities. + + + + Dispatch each property value to ProcessValue(). + + + A cancellation token that can be used to cancel the work + + + + Visit a property value. Dispatch to the correct handler for the property type. + + + + A cancellation token that can be used to cancel the work + + + + Visit a component. Dispatch each property to + + + + A cancellation token that can be used to cancel the work + + + + + Visit a collection. Default superclass implementation is a no-op. + + + + A cancellation token that can be used to cancel the work + + + + + Walk the tree starting from the given entity. + + + + A cancellation token that can be used to cancel the work + + + Dispatch each property value to ProcessValue(). + + + + + + Visit a property value. Dispatch to the correct handler for the property type. + + + + + + + Visit a component. Dispatch each property to + + + + + + + + Visit a many-to-one or one-to-one associated entity. Default superclass implementation is a no-op. + + + + + + + + Visit a collection. Default superclass implementation is a no-op. + + + + + + + + Walk the tree starting from the given entity. + + + + + + + Defines the default flush event listeners used by hibernate for + flushing session state in response to generated auto-flush events. + + + + + Handle the given auto-flush event. + + The auto-flush event to be handled. + A cancellation token that can be used to cancel the work + + + + Handle the given auto-flush event. + + The auto-flush event to be handled. + + + + Defines the default delete event listener used by hibernate for deleting entities + from the datastore in response to generated delete events. + + + + Handle the given delete event. + The delete event to be handled. + A cancellation token that can be used to cancel the work + + + + We encountered a delete request on a transient instance. +

+ This is a deviation from historical Hibernate (pre-3.2) behavior to + align with the JPA spec, which states that transient entities can be + passed to remove operation in which case cascades still need to be + performed. +

+ The session which is the source of the event + The entity being delete processed + Is cascading of deletes enabled + The entity persister + + A cache of already visited transient entities (to avoid infinite recursion). + + A cancellation token that can be used to cancel the work +
+ + + Perform the entity deletion. Well, as with most operations, does not + really perform it; just schedules an action/execution with the + for execution during flush. + + The originating session + The entity to delete + The entity's entry in the + Is delete cascading enabled? + The entity persister. + A cache of already deleted entities. + A cancellation token that can be used to cancel the work + + + Handle the given delete event. + The delete event to be handled. + + + Called when we have recognized an attempt to delete a detached entity. + The event. + + This is perfectly valid in Hibernate usage; JPA, however, forbids this. + Thus, this is a hook for HEM to affect this behavior. + + + + + We encountered a delete request on a transient instance. +

+ This is a deviation from historical Hibernate (pre-3.2) behavior to + align with the JPA spec, which states that transient entities can be + passed to remove operation in which case cascades still need to be + performed. +

+ The session which is the source of the event + The entity being delete processed + Is cascading of deletes enabled + The entity persister + + A cache of already visited transient entities (to avoid infinite recursion). + +
+ + + Perform the entity deletion. Well, as with most operations, does not + really perform it; just schedules an action/execution with the + for execution during flush. + + The originating session + The entity to delete + The entity's entry in the + Is delete cascading enabled? + The entity persister. + A cache of already deleted entities. + + + + Defines the default dirty-check event listener used by hibernate for + checking the session for dirtiness in response to generated dirty-check events. + + + + + Defines the default evict event listener used by hibernate for evicting entities + in response to generated flush events. In particular, this implementation will + remove any hard references to the entity that are held by the infrastructure + (references held by application or other persistent instances are okay) + + + + + An event that occurs for each entity instance at flush time + + + + + Flushes a single entity's state to the database, by scheduling an update action, if necessary + + + + + Performs all necessary checking to determine if an entity needs an SQL update + to synchronize its state to the database. Modifies the event by side-effect! + Note: this method is quite slow, avoid calling if possible! + + + + Perform a dirty check, and attach the results to the event + + + + Flushes a single entity's state to the database, by scheduling an update action, if necessary + + + + + make sure user didn't mangle the id + + The obj. + The persister. + The id. + + + + Performs all necessary checking to determine if an entity needs an SQL update + to synchronize its state to the database. Modifies the event by side-effect! + Note: this method is quite slow, avoid calling if possible! + + + + Perform a dirty check, and attach the results to the event + + + + Defines the default flush event listeners used by hibernate for + flushing session state in response to generated flush events. + + + + called by a collection that wants to initialize itself + + + Try to initialize a collection from the cache + + + called by a collection that wants to initialize itself + + + Try to initialize a collection from the cache + + + + Defines the default load event listeners used by NHibernate for loading entities + in response to generated load events. + + + + Perfoms the load of an entity. + The loaded entity. + + + + Based on configured options, will either return a pre-existing proxy, + generate a new proxy, or perform an actual load. + + The result of the proxy/load operation. + + + + Given that there is a pre-existing proxy. + Initialize it if necessary; narrow if necessary. + + + + + If the class to be loaded has been configured with a cache, then lock + given id in that cache and then perform the load. + + The loaded entity + + + + Coordinates the efforts to load a given entity. First, an attempt is + made to load the entity from the session-level cache. If not found there, + an attempt is made to locate it in second-level cache. Lastly, an + attempt is made to load it directly from the datasource. + + The load event + The persister for the entity being requested for load + The EntityKey representing the entity to be loaded. + The load options. + A cancellation token that can be used to cancel the work + The loaded entity, or null. + + + + Performs the process of loading an entity from the configured underlying datasource. + + The load event + The persister for the entity being requested for load + The EntityKey representing the entity to be loaded. + The load options. + A cancellation token that can be used to cancel the work + The object loaded from the datasource, or null if not found. + + + + Attempts to locate the entity in the session-level cache. + + The load event + The EntityKey representing the entity to be loaded. + The load options. + A cancellation token that can be used to cancel the work + The entity from the session-level cache, or null. + + If allowed to return nulls, then if the entity happens to be found in + the session cache, we check the entity type for proper handling + of entity hierarchies. + If checkDeleted was set to true, then if the entity is found in the + session-level cache, it's current status within the session cache + is checked to see if it has previously been scheduled for deletion. + + + + Attempts to load the entity from the second-level cache. + The load event + The persister for the entity being requested for load + The load options. + A cancellation token that can be used to cancel the work + The entity from the second-level cache, or null. + + + Perfoms the load of an entity. + The loaded entity. + + + + Based on configured options, will either return a pre-existing proxy, + generate a new proxy, or perform an actual load. + + The result of the proxy/load operation. + + + + Given that there is a pre-existing proxy. + Initialize it if necessary; narrow if necessary. + + + + + Given that there is no pre-existing proxy. + Check if the entity is already loaded. If it is, return the entity, + otherwise create and return a proxy. + + + + + If the class to be loaded has been configured with a cache, then lock + given id in that cache and then perform the load. + + The loaded entity + + + + Coordinates the efforts to load a given entity. First, an attempt is + made to load the entity from the session-level cache. If not found there, + an attempt is made to locate it in second-level cache. Lastly, an + attempt is made to load it directly from the datasource. + + The load event + The persister for the entity being requested for load + The EntityKey representing the entity to be loaded. + The load options. + The loaded entity, or null. + + + + Performs the process of loading an entity from the configured underlying datasource. + + The load event + The persister for the entity being requested for load + The EntityKey representing the entity to be loaded. + The load options. + The object loaded from the datasource, or null if not found. + + + + Attempts to locate the entity in the session-level cache. + + The load event + The EntityKey representing the entity to be loaded. + The load options. + The entity from the session-level cache, or null. + + If allowed to return nulls, then if the entity happens to be found in + the session cache, we check the entity type for proper handling + of entity hierarchies. + If checkDeleted was set to true, then if the entity is found in the + session-level cache, it's current status within the session cache + is checked to see if it has previously been scheduled for deletion. + + + + Attempts to load the entity from the second-level cache. + The load event + The persister for the entity being requested for load + The load options. + The entity from the second-level cache, or null. + + + + Defines the default lock event listeners used by hibernate to lock entities + in response to generated lock events. + + + + Handle the given lock event. + The lock event to be handled. + A cancellation token that can be used to cancel the work + + + Handle the given lock event. + The lock event to be handled. + + + + Defines the default event listener for handling of merge events generated from a session. + + + + + Perform any cascades needed as part of this copy event. + + The merge event being processed. + The persister of the entity being copied. + The entity being copied. + A cache of already copied instance. + A cancellation token that can be used to cancel the work + + + + Determine which merged entities in the copyCache are transient. + + + + A cancellation token that can be used to cancel the work + + Should this method be on the EventCache class? + + + + Retry merging transient entities + + + + + A cancellation token that can be used to cancel the work + + + Cascade behavior is redefined by this subclass, disable superclass behavior + + + Cascade behavior is redefined by this subclass, disable superclass behavior + + + + Perform any cascades needed as part of this copy event. + + The merge event being processed. + The persister of the entity being copied. + The entity being copied. + A cache of already copied instance. + + + + Determine which merged entities in the copyCache are transient. + + + + + Should this method be on the EventCache class? + + + + Retry merging transient entities + + + + + + + Cascade behavior is redefined by this subclass, disable superclass behavior + + + Cascade behavior is redefined by this subclass, disable superclass behavior + + + + Defines the default create event listener used by hibernate for creating + transient entities in response to generated create events. + + + + Handle the given create event. + The save event to be handled. + + A cancellation token that can be used to cancel the work + + + Handle the given create event. + The save event to be handled. + + + + + Called before injecting property values into a newly + loaded entity instance. + + + + + Defines the default refresh event listener used by hibernate for refreshing entities + in response to generated refresh events. + + + + + Defines the default replicate event listener used by Hibernate to replicate + entities in response to generated replicate events. + + + + An event handler for save() events + + + + Defines the default listener used by Hibernate for handling save-update events. + + + + + The given save-update event named a transient entity. + Here, we will perform the save processing. + + The save event to be handled. + A cancellation token that can be used to cancel the work + The entity's identifier after saving. + + + + Save the transient instance, assigning the right identifier + + The initiating event. + A cancellation token that can be used to cancel the work + The entity's identifier value after saving. + + + + The given save-update event named a detached entity. + Here, we will perform the update processing. + + The update event to be handled. + A cancellation token that can be used to cancel the work + + + + Handles the calls needed to perform cascades as part of an update request + for the given entity. + + The event currently being processed. + The defined persister for the entity being updated. + The entity being updated. + A cancellation token that can be used to cancel the work + + + + The given save-update event named a transient entity. + Here, we will perform the save processing. + + The save event to be handled. + The entity's identifier after saving. + + + + Save the transient instance, assigning the right identifier + + The initiating event. + The entity's identifier value after saving. + + + + The given save-update event named a detached entity. + Here, we will perform the update processing. + + The update event to be handled. + + + Determine the id to use for updating. + The entity. + The entity persister + The requested identifier + The id. + + + + Handles the calls needed to perform cascades as part of an update request + for the given entity. + + The event currently being processed. + The defined persister for the entity being updated. + The entity being updated. + + + An event handler for update() events + + + + If the user specified an id, assign it to the instance and use that, + otherwise use the id already assigned to the instance + + + + + A Visitor that determines if a dirty collection was found. + + + + + Reason for dirty collection + + + + If it is a new application-instantiated collection, return true (does not occur anymore!) + + + + + If it is a component, recurse. + + + + + If it is a wrapped collection, ask the collection entry. + + + + + + + + Gets a indicating if a dirty collection was found. + + if a dirty collection was found. + + + + Evict any collections referenced by the object from the session cache. + This will NOT pick up any collections that were dereferenced, so they + will be deleted (suboptimal but not exactly incorrect). + + + + + Process collections reachable from an entity. + This visitor assumes that wrap was already performed for the entity. + + + + + When a transient entity is passed to lock(), we must inspect all its collections and + 1. associate any uninitialized PersistentCollections with this session + 2. associate any initialized PersistentCollections with this session, using the existing snapshot + 3. throw an exception for each "new" collection + + + + + When an entity is passed to replicate(), and there is an existing row, we must + inspect all its collections and + 1. associate any uninitialized PersistentCollections with this session + 2. associate any initialized PersistentCollections with this session, using the existing snapshot + 3. execute a collection removal (SQL DELETE) for each null collection property or "new" collection + + + + + When an entity is passed to update(), we must inspect all its collections and + 1. associate any uninitialized PersistentCollections with this session + 2. associate any initialized PersistentCollections with this session, using the existing snapshot + 3. execute a collection removal (SQL DELETE) for each null collection property or "new" collection + + + + + Abstract superclass of visitors that reattach collections + + + + + Schedules a collection for deletion. + + The persister representing the collection to be removed. + The collection key (differs from owner-id in the case of property-refs). + The session from which the request originated. + + + + This version is slightly different in that here we need to assume that + the owner is not yet associated with the session, and thus we cannot + rely on the owner's EntityEntry snapshot... + + The persister for the collection role being processed. + + + + + Wrap collections in a Hibernate collection wrapper. + + + + When persist is used as the cascade action, persistOnFlush should be used + + + Call interface if necessary + + + + Returns the number of entity-copy mappings in this EventCache + + + + + Associates the specified entity with the specified copy in this EventCache; + + + + indicates if the operation is performed on the entity + + + + Returns copy-entity mappings + + + + + + Returns true if the listener is performing the operation on the specified entity. + + Must be non-null and this EventCache must contain a mapping for this entity + + + + + Set flag to indicate if the listener is performing the operation on the specified entity. + + + + + + + Reassociates uninitialized proxies with the session + + + + + Visit a many-to-one or one-to-one associated entity. Default superclass implementation is a no-op. + + + + + + + + Has the owner of the collection changed since the collection was snapshotted and detached? + + + + + Reattach a detached (disassociated) initialized or uninitialized + collection wrapper, using a snapshot carried with the collection wrapper + + + + Defines the contract for handling of session auto-flush events. + + + + Handle the given auto-flush event. + + The auto-flush event to be handled. + A cancellation token that can be used to cancel the work + + + + Handle the given auto-flush event. + + The auto-flush event to be handled. + + + Defines the contract for handling of deletion events generated from a session. + + + Handle the given delete event. + The delete event to be handled. + A cancellation token that can be used to cancel the work + + + Handle the given delete event. + The delete event to be handled. + + + Defines the contract for handling of session dirty-check events. + + + Handle the given dirty-check event. + The dirty-check event to be handled. + A cancellation token that can be used to cancel the work + + + Handle the given dirty-check event. + The dirty-check event to be handled. + + + Force an immediate flush + + + Cascade merge an entity instance + + + Cascade persist an entity instance + + + Cascade persist an entity instance during the flush process + + + Cascade refresh an entity instance + + + Cascade delete an entity instance + + + Get the ActionQueue for this session + + + + Is auto-flush suspended? + + + + + Instantiate an entity instance, using either an interceptor, + or the given persister + + + + Force an immediate flush + + + Cascade merge an entity instance + + + Cascade persist an entity instance + + + Cascade persist an entity instance during the flush process + + + Cascade refresh an entity instance + + + Cascade delete an entity instance + + + + Suspend auto-flushing, yielding a disposable to dispose when auto flush should be restored. Supports + being called multiple times. + + A disposable to dispose when auto flush should be restored. + + + Defines the contract for handling of evict events generated from a session. + + + Handle the given evict event. + The evict event to be handled. + A cancellation token that can be used to cancel the work + + + Handle the given evict event. + The evict event to be handled. + + + Defines the contract for handling of session flush events. + + + Handle the given flush event. + The flush event to be handled. + A cancellation token that can be used to cancel the work + + + Handle the given flush event. + The flush event to be handled. + + + + Defines the contract for handling of collection initialization events + generated by a session. + + + + + Defines the contract for handling of load events generated from a session. + + + + + Handle the given load event. + + The load event to be handled. + + A cancellation token that can be used to cancel the work + The result (i.e., the loaded entity). + + + + Handle the given load event. + + The load event to be handled. + + The result (i.e., the loaded entity). + + + + Defines the contract for handling of lock events generated from a session. + + + + Handle the given lock event. + The lock event to be handled. + A cancellation token that can be used to cancel the work + + + Handle the given lock event. + The lock event to be handled. + + + + Defines the contract for handling of merge events generated from a session. + + + + Handle the given merge event. + The merge event to be handled. + A cancellation token that can be used to cancel the work + + + Handle the given merge event. + The merge event to be handled. + + A cancellation token that can be used to cancel the work + + + Handle the given merge event. + The merge event to be handled. + + + Handle the given merge event. + The merge event to be handled. + + + + + Defines the contract for handling of create events generated from a session. + + + + Handle the given create event. + The create event to be handled. + A cancellation token that can be used to cancel the work + + + Handle the given create event. + The create event to be handled. + + A cancellation token that can be used to cancel the work + + + Handle the given create event. + The create event to be handled. + + + Handle the given create event. + The create event to be handled. + + + + Called after recreating a collection + + + Called after removing a collection + + + Called after updating a collection + + + Called after deleting an item from the datastore + + + + + + + A cancellation token that can be used to cancel the work + + + + + + + + + Called after inserting an item in the datastore + + + + + + + A cancellation token that can be used to cancel the work + + + + + + + + + + Called after updating the datastore + + + + + + + + A cancellation token that can be used to cancel the work + + + + + + + + + Called before recreating a collection + + + Called before removing a collection + + + Called before updating a collection + + + + Called before deleting an item from the datastore + + + + Return true if the operation should be vetoed + + A cancellation token that can be used to cancel the work + + + Return true if the operation should be vetoed + + + + + Called before inserting an item in the datastore + + + + Return true if the operation should be vetoed + + A cancellation token that can be used to cancel the work + + + Return true if the operation should be vetoed + + + + + Called before injecting property values into a newly loaded entity instance. + + + + + + + + A cancellation token that can be used to cancel the work + + + + + + + + + + Called before updating the datastore + + + + Return true if the operation should be vetoed + + A cancellation token that can be used to cancel the work + + + Return true if the operation should be vetoed + + + + + Defines the contract for handling of refresh events generated from a session. + + + + Handle the given refresh event. + The refresh event to be handled. + A cancellation token that can be used to cancel the work + + + + + + + + A cancellation token that can be used to cancel the work + + + Handle the given refresh event. + The refresh event to be handled. + + + + + + + + + + + Defines the contract for handling of replicate events generated from a session. + + + + Handle the given replicate event. + The replicate event to be handled. + A cancellation token that can be used to cancel the work + + + Handle the given replicate event. + The replicate event to be handled. + + + + Defines the contract for handling of update events generated from a session. + + + + Handle the given update event. + The update event to be handled. + A cancellation token that can be used to cancel the work + + + Handle the given update event. + The update event to be handled. + + + Defines a base class for events involving collections. + + + Constructs an AbstractCollectionEvent object. + The collection persister. + The collection + The Session source + The owner that is affected by this event; can be null if unavailable + + The ID for the owner that is affected by this event; can be null if unavailable + that is affected by this event; can be null if unavailable + + + + The collection owner entity that is affected by this event. + + Returns null if the entity is not in the persistence context + (e.g., because the collection from a detached entity was moved to a new owner) + + + + Get the ID for the collection owner entity that is affected by this event. + + Returns null if the ID cannot be obtained + from the collection's loaded key (e.g., a property-ref is used for the + collection and does not include the entity's ID) + + + + Get the entity name for the collection owner entity that is affected by this event. + + The entity name; if the owner is not in the PersistenceContext, the + returned value may be a superclass name, instead of the actual class name + + + + + Defines a base class for Session generated events. + + + + + Constructs an event from the given event session. + + The session event source. + + + + Returns the session event source for this event. + This is the underlying session from which this event was generated. + + + + + Represents an operation we performed against the database. + + + + Constructs an event containing the pertinent information. + The session from which the event originated. + The entity to be involved in the database operation. + The entity id to be involved in the database operation. + The entity's persister. + + + The entity involved in the database operation. + + + The id to be used in the database operation. + + + + The persister for the . + + + + + Represents an operation we are about to perform against the database. + + + + Constructs an event containing the pertinent information. + The session from which the event originated. + The entity to be involved in the database operation. + The entity id to be involved in the database operation. + The entity's persister. + + + The entity involved in the database operation. + + + The id to be used in the database operation. + + + + The persister for the . + + + + Defines an event class for the auto-flushing of a session. + + + Defines an event class for the deletion of an entity. + + + Constructs a new DeleteEvent instance. + The entity to be deleted. + The session from which the delete event was generated. + + + + + Returns the encapsulated entity to be deleted. + + + + Defines an event class for the dirty-checking of a session. + + + + A convenience holder for all defined session event listeners. + + + + + Call on any listeners that implement + . + + + + + Defines an event class for the evicting of an entity. + + + Defines an event class for the flushing of a session. + + + + Returns the session event source for this event. + This is the underlying session from which this event was generated. + + + + + Contract for listeners which require notification of SessionFactory closing, + presumably to destroy internal state. + + + + + Notification of shutdown. + + + + + An event listener that requires access to mappings to + initialize state at initialization time. + + + + + An event that occurs when a collection wants to be initialized + + + + + Represents an operation we performed against the database. + + + + The entity involved in the database operation. + + + The id to be used in the database operation. + + + + The persister for the . + + + + + Occurs after an an entity instance is fully loaded. + + + + + + + + + + The entity involved in the database operation. + + + The id to be used in the database operation. + + + + The persister for the . + + + + + Values for listener type property. + + + + Not allowed in Xml. It represents the default value when an explicit type is assigned. + + + Xml value: auto-flush + + + Xml value: merge + + + Xml value: create + + + Xml value: create-onflush + + + Xml value: delete + + + Xml value: dirty-check + + + Xml value: evict + + + Xml value: flush + + + Xml value: flush-entity + + + Xml value: load + + + Xml value: load-collection + + + Xml value: lock + + + Xml value: refresh + + + Xml value: replicate + + + Xml value: save-update + + + Xml value: save + + + Xml value: pre-update + + + Xml value: update + + + Xml value: pre-load + + + Xml value: pre-delete + + + Xml value: pre-insert + + + Xml value: pre-collection-recreate + + + Xml value: pre-collection-remove + + + Xml value: pre-collection-update + + + Xml value: post-load + + + Xml value: post-insert + + + Xml value: post-update + + + Xml value: post-delete + + + Xml value: post-commit-update + + + Xml value: post-commit-insert + + + Xml value: post-commit-delete + + + Xml value: post-collection-recreate + + + Xml value: post-collection-remove + + + Xml value: post-collection-update + + + Defines an event class for the loading of an entity. + + + + Defines an event class for the locking of an entity. + + + + + An event class for merge() and saveOrUpdateCopy() + + + + An event class for persist() + + + An event that occurs after a collection is recreated + + + An event that occurs after a collection is removed + + + An event that occurs after a collection is updated + + + + Occurs after deleting an item from the datastore + + + + + Occurs after inserting an item in the datastore + + + + + Occurs after an an entity instance is fully loaded. + + + + + Occurs after the datastore is updated + + + + An event that occurs before a collection is recreated + + + An event that occurs before a collection is removed + + + An event that occurs before a collection is updated + + + + Represents a pre-delete event, which occurs just prior to + performing the deletion of an entity from the database. + + + + + Constructs an event containing the pertinent information. + + The entity to be deleted. + The id to use in the deletion. + The entity's state at deletion time. + The entity's persister. + The session from which the event originated. + + + + This is the entity state at the + time of deletion (useful for optimistic locking and such). + + + + + Represents a pre-insert event, which occurs just prior to + performing the insert of an entity into the database. + + + + + These are the values to be inserted. + + + + + Called before injecting property values into a newly loaded entity instance. + + + + + Represents a pre-update event, which occurs just prior to + performing the update of an entity in the database. + + + + + Retrieves the state to be used in the update. + + + + + The old state of the entity at the time it was last loaded from the + database; can be null in the case of detached entities. + + + + + Defines an event class for the refreshing of an object. + + + + + Defines an event class for the replication of an entity. + + + + + An event class for saveOrUpdate() + + + + + Encapsulates the strategy required to execute various types of update, delete, + and insert statements issued through HQL. + + + + + Execute the sql managed by this executor using the given parameters. + + Essentially bind information for this processing. + The session originating the request. + A cancellation token that can be used to cancel the work + The number of entities updated/deleted. + + + + + Execute the sql managed by this executor using the given parameters. + + Essentially bind information for this processing. + The session originating the request. + The number of entities updated/deleted. + + + + + Creates a new AST-based query translator. + + The query-identifier (used in stats collection) + The hql query to translate + Currently enabled filters + The session factory constructing this translator instance. + + + + Compile a "normal" query. This method may be called multiple + times. Subsequent invocations are no-ops. + + Defined query substitutions. + Does this represent a shallow (scalar or entity-id) select? + + + + Compile a filter. This method may be called multiple + times. Subsequent invocations are no-ops. + + the role name of the collection used as the basis for the filter. + Defined query substitutions. + Does this represent a shallow (scalar or entity-id) select? + + + + Performs both filter and non-filter compiling. + + Defined query substitutions. + Does this represent a shallow (scalar or entity-id) select? + the role name of the collection used as the basis for the filter, NULL if this is not a filter. + + + + Generates translators which uses the Antlr-based parser to perform + the translation. + + Author: Gavin King + Ported by: Steve Strong + + + + + Look ahead for tokenizing is all lowercase, whereas the original case of an input stream is preserved. + Copied from http://www.antlr.org/wiki/pages/viewpage.action?pageId=1782 + + + + + Provides a map of collection function names to the corresponding property names. + Author: josh + Ported by: Steve Strong + + + + + An error handler that counts parsing errors and warnings. + + + + + Handles HQL AST transformation for collection filters (which are created with ). + + Adds FROM elements to implicit FROM clause. + E.g., + + ( query ( SELECT_FROM {filter-implied FROM} ) ( where ( = X 10 ) ) ) + + gets converted to + + ( query ( SELECT_FROM ( FROM NHibernate.DomainModel.Many this ) ) ( where ( = X 10 ) ) ) + + + The root node of HQL query + Collection that is being filtered + Session factory + + + True if this is a filter query (allow no FROM clause). * + + + + Returns to the previous 'FROM' context. + + + + + A custom token class for the HQL grammar. + + + + + The previous token type. + + + + + Public constructor + + + + + Public constructor + + + + + Indicates if the token could be an identifier. + + + + + Returns the previous token type. + + + + + Returns a string representation of the object. + + The debug string + + + + Implementations will report or handle errors invoked by an ANTLR base parser. + Author: josh + Ported by: Steve Strong + + + + + Exception thrown when an invalid path is found in a query. + Author: josh + Ported by: Steve Strong + + + + + Defines the behavior of an error handler for the HQL parsers. + Author: josh + Ported by: Steve Strong + + + + + Construct a new SessionFactoryHelperExtensions instance. + + The SessionFactory impl to be encapsulated. + + + + Locate a registered sql function by name. + + The name of the function to locate + The sql function, or null if not found. + + + + Locate a registered sql function by name. + + The name of the function to locate + The sql function, or throws QueryException if no matching sql functions could be found. + + + + Find the function return type given the function name and the first argument expression node. + + The function name. + The first argument expression. + the function return type given the function name and the first argument expression node. + + + + Given a (potentially unqualified) class name, locate its imported qualified name. + + The potentially unqualified class name + The qualified class name. + + + + Does the given persister define a physical discriminator column + for the purpose of inheritance discrimination? + + The persister to be checked. + True if the persister does define an actual discriminator column. + + + + Locate the collection persister by the collection role. + + The collection role name. + The defined CollectionPersister for this collection role, or null. + + + + Determine the name of the property for the entity encapsulated by the + given type which represents the id or unique-key. + + The type representing the entity. + The corresponding property name + + + + Retrieves the column names corresponding to the collection elements for the given + collection role. + + The collection role + The sql column-qualification alias (i.e., the table alias) + the collection element columns + + + + Essentially the same as GetElementType, but requiring that the + element type be an association type. + + The collection type to be checked. + The AssociationType of the elements of the collection. + + + + Locate the collection persister by the collection role, requiring that + such a persister exist. + + The collection role name. + The defined CollectionPersister for this collection role. + + + + Locate the persister by class or entity name, requiring that such a persister + exist. + + The class or entity name + The defined persister for this entity + + + + Given a (potentially unqualified) class name, locate its persister. + + The (potentially unqualified) class name. + The defined persister for this class, or null if none found. + + + + Given a (potentially unqualified) class name, locate its persister. + + The session factory implementor. + The (potentially unqualified) class name. + The defined persister for this class, or null if none found. + + + + Locate the persister by class or entity name. + + The class or entity name + The defined persister for this entity, or null if none found. + + + + Create a join sequence rooted at the given collection. + + The persister for the collection at which the join should be rooted. + The alias to use for qualifying column references. + The generated join sequence. + + + + Generate an empty join sequence instance. + + The generated join sequence. + + + + Generate a join sequence representing the given association type. + + Should implicit joins (theta-style) or explicit joins (ANSI-style) be rendered + The type representing the thing to be joined into. + The table alias to use in qualifying the join conditions + The type of join to render (inner, outer, etc) + The columns making up the condition of the join. + The generated join sequence. + + + + Retrieve a PropertyMapping describing the given collection role. + + The collection role for which to retrieve the property mapping. + The property mapping. + + + + Given a collection type, determine the Type representing elements + within instances of that collection. + + The collection type to be checked. + The Type of the elements of the collection. + + + + Generates SQL by overriding callback methods in the base class, which does + the actual SQL AST walking. + Author: Joshua Davis, Steve Ebersole + Ported By: Steve Strong + + SQL Generator Tree Parser, providing SQL rendering of SQL ASTs produced by the previous phase, HqlSqlWalker. All + syntax decoration such as extra spaces, lack of spaces, extra parens, etc. should be added by this class. +
+ This grammar processes the HQL/SQL AST and produces an SQL string. The intent is to move dialect-specific + code into a sub-class that will override some of the methods, just like the other two grammars in this system. + @author Joshua Davis (joshua@hibernate.org) +
+ + all append invocations on the buf should go through this Output instance variable. + The value of this variable may be temporarily substitued by sql function processing code + to catch generated arguments. + This is because sql function templates need arguments as separate string chunks + that will be assembled into the target dialect-specific function call. + + + + Handles parser errors. + + + + + Add a space if the previous token was not a space or a parenthesis. + + + + + The default SQL writer. + + + + + The default SQL writer. + + + + + Writes SQL fragments. + + + + todo remove this hack + The parameter is either ", " or " , ". This is needed to pass sql generating tests as the old + sql generator uses " , " in the WHERE and ", " in SELECT. + + @param comma either " , " or ", " + + + + Base class for nodes dealing 'is null' and 'is not null' operators. + todo : a good deal of this is copied from BinaryLogicOperatorNode; look at consolidating these code fragments + + Author: Steve Ebersole + Ported by: Steve Strong + + + + + When (if) we need to expand a row value constructor, what is the type of connector to use between the + expansion fragments. + + The expansion connector type. + + + + When (if) we need to expand a row value constructor, what is the text of connector to use between the + expansion fragments. + + The expansion connector text. + + + + Convenience implementation of Statement to centralize common functionality. + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Returns additional display text for the AST node. + + The additional display text. + + + + Represents an aggregate function i.e. min, max, sum, avg. + + Author: Joshua Davis + Ported by: Steve Strong + + + + + Encapsulates the information relating to an individual assignment within the + set clause of an HQL update statement. This information is used during execution + of the update statements when the updates occur against "multi-table" stuff. + + + + + Contract for nodes representing logical BETWEEN (ternary) operators. + + + + + Nodes which represent binary arithmetic operators. + + + + Retrieves the left-hand operand of the operator. + + @return The left-hand operand + + + Retrieves the right-hand operand of the operator. + + @return The right-hand operand + + + + Contract for nodes representing binary operators. + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Performs the operator node initialization by seeking out any parameter + nodes and setting their expected type, if possible. + + + + Mutate the subtree relating to a row-value-constructor to instead use + a series of ANDed predicates. This allows multi-column type comparisons + and explicit row-value-constructor syntax even on databases which do + not support row-value-constructor. +

+ For example, here we'd mutate "... where (col1, col2) = ('val1', 'val2) ..." to + "... where col1 = 'val1' and col2 = 'val2' ..." + + @param valueElements The number of elements in the row value constructor list. + + +

+ Represents a boolean literal within a query. + +
+ + + Represents a case ... when .. then ... else ... end expression in a select. + + + + + Represents a case ... when .. then ... else ... end expression in a select. + + Author: Gavin King + Ported by: Steve Strong + + + + + Represents 'elements()' or 'indices()'. + Author: josh + Ported by: Steve strong + + + + + Represents a COUNT expression in a select. + Author: josh + Ported by: Steve Strong + + + + + Defines a top-level AST node representing an HQL delete statement. + + + + + Represents a reference to a property or alias expression. This should duplicate the relevant behaviors in + PathExpressionParser. + Author: Joshua Davis + Ported by: Steve Strong + + + + + The full path, to the root alias of this dot node. + + + + + The type of dereference that happened (DEREF_xxx). + + + + + The identifier that is the name of the property. + + + + + The unresolved property path relative to this dot node. + + + + + The column names that this resolves to. + + + + + Fetch join or not. + + + + + The type of join to create. Default is an inner join. + + + + + Sets the join type for this '.' node structure. + + + + + Returns the full path of the node. + + + + + Is the given property name a reference to the primary key of the associated + entity construed by the given entity type? + For example, consider a fragment like order.customer.id + (where order is a from-element alias). Here, we'd have: + propertyName = "id" AND + owningType = ManyToOneType(Customer) + and are being asked to determine whether "customer.id" is a reference + to customer's PK... + + The name of the property to check. + The type representing the entity "owning" the property + True if propertyName references the entity's (owningType->associatedEntity) primary key; false otherwise. + + + + Represents the 'FROM' part of a query or subquery, containing all mapped class references. + Author: josh + Ported by: Steve Strong + + + + + Counts the from elements as they are added. + + + + + All of the implicit FROM xxx JOIN yyy elements that are the destination of a collection. These are created from + index operators on collection property references. + + + + + Pointer to the parent FROM clause, if there is one. + + + + + Collection of FROM clauses of which this is the parent. + + + + + Convenience method to check whether a given token represents a from-element alias. + + The potential from-element alias to check. + True if the possibleAlias is an alias to a from-element visible from this point in the query graph. + + + + Returns true if the from node contains the class alias name. + + The HQL class alias name. + true if the from node contains the class alias name. + + + + Returns true if the from node contains the table alias name. + + The SQL table alias name. + true if the from node contains the table alias name. + + + + Adds a new from element to the from node. + + The reference to the class. + The alias AST. + The new FROM element. + + + + Retrieves the from-element represented by the given alias. + + The alias by which to locate the from-element. + The from-element assigned the given alias, or null if none. + + + + Returns the list of from elements in order. + + The list of from elements (instances of FromElement). + + + + Returns the list of from elements that will be part of the result set. + + the list of from elements that will be part of the result set. + + + + Look for an existing implicit or explicit join by the given path. + + + + + Constructor form used to initialize . + + The FROM clause to which this element belongs. + The origin (LHS) of this element. + The alias applied to this element. + + + + Returns true if this FromElement was implied by a path, or false if this FROM element is explicitly declared in + the FROM clause. + + + + + Returns the identifier select SQL fragment. + + The total number of returned types. + The sequence of the current returned type. + the identifier select SQL fragment. + + + + Returns the property select SQL fragment. + + The total number of returned types. + The sequence of the current returned type. + the property select SQL fragment. + + + + Render the identifier select, but in a 'scalar' context (i.e. generate the column alias). + + the sequence of the returned type + the identifier select with the column alias. + + + + Creates entity from elements. + + + + + + + + Creates collection from elements. + + + + + + + + + + + Delegate that handles the type and join sequence information for a FromElement. + Author: josh + Ported by: Steve Strong + + + + + Returns the identifier select SQL fragment. + + The total number of returned types. + The sequence of the current returned type. + the identifier select SQL fragment. + + + + Render the identifier select, but in a 'scalar' context (i.e. generate the column alias). + + the sequence of the returned type + the identifier select with the column alias. + + + + Returns the property select SQL fragment. + + The total number of returned types. + The sequence of the current returned type. + + the property select SQL fragment. + + + + Returns the type of a property, given it's name (the last part) and the full path. + + The last part of the full path to the property. + The full property path. + The type + + + + Returns the Hibernate queryable implementation for the HQL class. + + + + + This accounts for a quirk in Queryable, where it sometimes generates ', ' in front of the + SQL fragment. :-P + + A SQL fragment. + The fragment, without the leading comma and spaces. + + + + Sub-classes can override this method if they produce implied joins (e.g. DotNode). + + an implied join created by this from reference. + + + + A semantic analysis node, that points back to the main analyzer. + Author: josh + Ported by: Steve Strong + + + + A pointer back to the phase 2 processor. + + + + Contract for nodes representing binary operators. + Author: Steve Ebersole + Ported by: Steve Strong + + + + + The left-hand operand of the operator. + + + + + The right-hand operand of the operator. + + + + + Implementors will return additional display text, which will be used + by the ASTPrinter to display information (besides the node type and node + text). + + + + + Returns additional display text for the AST node. + + The additional display text. + + + + Interface for nodes which wish to be made aware of any determined "expected + type" based on the context within they appear in the query. + Author: Steve Ebersole + Ported by: Steve Strong + + + + + An interface for initializable AST nodes. + + + + + Initializes the node with the parameter. + + the initialization parameter. + + + + Represents the [] operator and provides it's semantics. + Author: josh + Ported by: Steve Strong + + + + + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Defines a top-level AST node representing an HQL "insert select" statement. + + + + Retrieve this insert statement's into-clause. + The into-clause + + + Retrieve this insert statement's select-clause. + The select-clause. + + + Performs detailed semantic validation on this insert statement tree. + Indicates validation failure. + + + + Represents an entity referenced in the INTO clause of an HQL + INSERT statement. + + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Returns additional display text for the AST node. + + The additional display text. + + + + Determine whether the two types are "assignment compatible". + + The type defined in the into-clause. + The type defined in the select clause. + True if they are assignment compatible. + + + + Contract for nodes representing operators (logic or arithmetic). + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Called by the tree walker during hql-sql semantic analysis + after the operator sub-tree is completely built. + + + + + Retrieves the data type for the overall operator expression. + + The expression's data type. + + + + Currently this is needed in order to deal with {@link FromElement FromElements} which + contain "hidden" JDBC parameters from applying filters. + Would love for this to go away, but that would require that Hibernate's + internal {@link org.hibernate.engine.JoinSequence join handling} be able to either:
    +
  • render the same AST structures
  • +
  • render structures capable of being converted to these AST structures
  • +
+ In the interim, this allows us to at least treat these "hidden" parameters properly which is + the most pressing need. + Author: Steve Ebersole + Ported by: Steve Strong +
+
+ + + Set the renderable text of this node. + + + + + Adds a parameter specification for a parameter encountered within this node. We use the term 'embedded' here + because of the fact that the parameter was simply encountered as part of the node's text; it does not exist + as part of a subtree as it might in a true AST. + + The generated specification. + + + + Determine whether this node contains embedded parameters. The implication is that + {@link #getEmbeddedParameters()} is allowed to return null if this method returns false. + + + + + Retrieve all embedded parameter specifications. + + All embedded parameter specifications; may return null. + + + + An AST node with a path property. This path property will be the fully qualified name. + Author: josh + Ported by: Steve Strong + + + + + Returns the full path name represented by the node. + + the full path name represented by the node. + + + + The contract for expression sub-trees that can resolve themselves. + Author: josh + Ported by: Steve Strong + + + + + Does the work of resolving an identifier or a dot + + + + + Does the work of resolving an identifier or a dot, but without a parent node + + + + + Does the work of resolving an identifier or a dot, but without a parent node or alias + + + + + Does the work of resolving inside of the scope of a function call + + + + + Does the work of resolving an an index []. + + + + + Type definition for Statements which are restrictable via a where-clause (and + thus also having a from-clause). + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Retrieves the from-clause in effect for this statement; could be null if the from-clause + has not yet been parsed/generated. + + + + + Does this statement tree currently contain a where clause? + Returns True if a where-clause is found in the statement tree and + that where clause actually defines restrictions; false otherwise. + + + + + Retrieves the where-clause defining the restriction(s) in effect for + this statement. + Note that this will generate a where-clause if one was not found, so caution + needs to taken prior to calling this that restrictions will actually exist + in the resulting statement tree (otherwise "unexpected end of subtree" errors + might occur during rendering). + + + + + Represents an element of a projection list, i.e. a select expression. + Author: josh + Ported by: Steve Strong + + + + + Returns the data type of the select expression. + + + + + Set the scalar column index and appends AST nodes that represent the columns after the current AST node. + (e.g. 'as col0_O_') + + The index of the select expression in the projection list. + + + + Sets the index and text for select expression in the projection list. + + The index of the select expression in the projection list. + + + + Gets index of the select expression in the projection list. + + The index of the select expression in the projection list. + + + + Returns the FROM element that this expression refers to. + + + + + Returns true if the element is a constructor (e.g. new Foo). + + + + + Returns true if this select expression represents an entity that can be returned. + + + + + Sets the text of the node. + + + + + Interface for nodes which require access to the SessionFactory + + Author: Steve Ebersole + Ported by: Steve Strong + + + + + IsNotNullLogicOperatorNode implementation + + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Represents a 'is null' check. + + + + + Common interface modeling the different HQL statements (i.e., INSERT, UPDATE, DELETE, SELECT). + Author: Steve Ebersole + Ported by: Steve Strong + + + + + The "phase 2" walker which generated this statement tree. + + + + + The main token type representing the type of this statement. + + + + + Does this statement require the StatementExecutor? + Essentially, at the JDBC level, does this require an executeUpdate()? + + + + + Contract for nodes representing unary operators. + + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Retrieves the node representing the operator's single operand. + + + + + A node representing a static Java constant. + + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Represents a literal. + + Author: josh + Ported by: Steve Strong + + + + + Represents a method call + Author: josh + Ported by: Steve Strong + + + + + Implementation of OrderByClause. + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Implementation of ParameterNode. + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Locate the select clause that is part of this select statement. + Note, that this might return null as derived select clauses (i.e., no + select clause at the HQL-level) get generated much later than when we + get created; thus it depends upon lifecycle. + + Our select clause, or null. + + + + Represents a reference to a result_variable as defined in the JPA 2 spec. + + + select v as value from tab1 order by value + "value" used in the order by clause is a reference to the result_variable, "value", defined in the select clause. + + Author: Gail Badner + + + + Represents the list of expressions in a SELECT clause. + Author: josh + Ported by: Steve Strong + + + + + Prepares a derived (i.e., not explicitly defined in the query) select clause. + + The from clause to which this select clause is linked. + + + + Prepares an explicitly defined select clause. + + The from clause linked to this select clause. + + + + + FromElements which need to be accounted for in the load phase (either for return or for fetch). + + + + + The column alias names being used in the generated SQL. + + + + + The constructor to use for dynamic instantiation queries. + + + + + The HQL aliases, or generated aliases + + + + + The types actually being returned from this query at the "object level". + + + + + A select expression that was generated by a FROM element. + Author: josh + Ported by: Steve Strong + + + + + Common behavior - a node that contains a list of select expressions. + Author: josh + Ported by: Steve Strong + + + + + Returns an array of SelectExpressions gathered from the children of the given parent AST node. + + + + + Returns an array of SelectExpressions gathered from the children of the given parent AST node. + + + + + Returns the first select expression node that should be considered when building the array of select + expressions. + + + + + Represents an SQL fragment in the AST. + Author: josh + Ported by: Steve Strong + + + + + A base AST node for the intermediate tree. + + + + The original text for the node, mostly for debugging. + + + The data type of this node. Null for 'no type'. + + + + Retrieve the text to be used for rendering this particular node. + + The session factory + The text to use for rendering + + + + Represents a unary operator node. + + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Defines a top-level AST node representing an HQL update statement. + + + + + Generates class/table/column aliases during semantic analysis and SQL rendering. + Its essential purpose is to keep an internal counter to ensure that the + generated aliases are unique. + + + + + Appends child nodes to a parent efficiently. + + + + + Depth first iteration of an ANTLR AST. + Author: josh + Ported by: Steve Strong + + + + + Returns the 'list' representation with some brackets around it for debugging. + + The tree. + The list representation of the tree. + + + + Determine if a given node (test) is contained anywhere in the subtree + of another given node (fixture). + + The node against which to be checked for children. + The node to be tested as being a subtree child of the parent. + True if child is contained in the parent's collection of children. + + + + Finds the first node of the specified type in the chain of children. + + The parent + The type to find. + The first node of the specified type, or null if not found. + + + + Filters nodes in/out of a tree. + + The node to check. + true to keep the node, false if the node should be filtered out. + + + + Generates the scalar column AST nodes for a given array of SQL columns + + + + + Performs the post-processing of the join information gathered during semantic analysis. + The join generating classes are complex, this encapsulates some of the JoinSequence-related + code. + Author: Joshua Davis + Ported by: Steve Strong + + + + + Constructs a new JoinProcessor. + + The walker to which we are bound, giving us access to needed resources. + + + + Translates an AST join type (i.e., the token type) into a JoinFragment.XXX join type. + + The AST join type (from HqlSqlWalker) + a JoinType.XXX join type. + + + + Indicates that Float and Double literal values should + be treated using the SQL "exact" format (i.e., '.001') + + + + + Indicates that Float and Double literal values should + be treated using the SQL "approximate" format (i.e., '1E-3') + + + + + In what format should Float and Double literal values be sent + to the database? + See #EXACT, #APPROXIMATE + + + + + Traverse the AST tree depth first. Note that the AST passed in is not visited itself. Visitation starts + with its children. + + ast + + + + Turns a path into an AST. + + The path. + The AST factory to use. + An HQL AST representing the path. + + + + Creates synthetic and nodes based on the where fragment part of a JoinSequence. + Author: josh + Ported by: Steve Strong + + + + + Generate a cast node intended solely to hint HQL at the resulting type, without issuing an actual SQL cast. + + The expression to cast. + The resulting type. + A node. + + + + Cast node intended solely to hint HQL at the resulting type, without issuing an actual SQL cast. + + + + + Defines the contract of an HQL->SQL translator. + + + + + Perform a list operation given the underlying query definition. + + The session owning this query. + The query bind parameters. + A cancellation token that can be used to cancel the work + The query list results. + + + + + Perform a bulk update/delete operation given the underlying query definition. + + The query bind parameters. + The session owning this query. + A cancellation token that can be used to cancel the work + The number of entities updated or deleted. + + + + + Compile a "normal" query. This method may be called multiple times. Subsequent invocations are no-ops. + + Defined query substitutions. + Does this represent a shallow (scalar or entity-id) select? + There was a problem parsing the query string. + There was a problem querying defined mappings. + + + + Perform a list operation given the underlying query definition. + + The session owning this query. + The query bind parameters. + The query list results. + + + + + Perform a bulk update/delete operation given the underlying query definition. + + The query bind parameters. + The session owning this query. + The number of entities updated or deleted. + + + + + The set of query spaces (table names) that the query refers to. + + + + + The SQL string generated by the translator. + + + + + The HQL string processed by the translator. + + + + + Returns the filters enabled for this query translator. + + Filters enabled for this query execution. + + + + Returns an array of Types represented in the query result. + + Query return types. + + + + Returns an array of HQL aliases + + Returns an array of HQL aliases + + + + Returns the column names in the generated SQL. + + the column names in the generated SQL. + + + + Does the translated query contain collection fetches? + + True if the query does contain collection fetched; false otherwise. + + + + Specialized interface for filters. + + + + + Compile a filter. This method may be called multiple + times. Subsequent invocations are no-ops. + + the role name of the collection used as the basis for the filter. + Defined query substitutions. + Does this represent a shallow (scalar or entity-id) select? + + + + Facade for generation of + and instances. + + + + + Construct a instance + capable of translating a Linq expression. + + The query expression to be translated + + + Currently enabled filters + The session factory + An appropriate translator. + + + + Provides utility methods for generating HQL / SQL names. + Shared by both the 'classic' and 'new' query translators. + + + + + Handle Hibernate "implicit" polymorphism, by translating the query string into + several "concrete" queries against mapped classes. + + + + + + + + + Wraps SessionFactoryImpl, adding more lookup behaviors and encapsulating some of the error handling. + + + + + Locate the collection persister by the collection role. + + The collection role name. + The defined CollectionPersister for this collection role, or null. + + + + Locate the persister by class or entity name, requiring that such a persister + exists + + The class or entity name + The defined persister for this entity + + + + Locate the persister by class or entity name. + + The class or entity name + The defined persister for this entity, or null if none found. + + + + Retrieve a PropertyMapping describing the given collection role. + + The collection role for which to retrieve the property mapping. + The property mapping. + + + + Criteria is a simplified API for retrieving entities by composing + objects. + + + + Using criteria is a very convenient approach for functionality like "search" screens + where there is a variable number of conditions to be placed upon the result set. + + + The Session is a factory for ICriteria. Expression instances are usually obtained via + the factory methods on . eg: + + + IList cats = session.CreateCriteria(typeof(Cat)) + .Add(Expression.Like("name", "Iz%")) + .Add(Expression.Gt("weight", minWeight)) + .AddOrder(Order.Asc("age")) + .List(); + + You may navigate associations using + or . eg: + + IList<Cat> cats = session.CreateCriteria<Cat> + .CreateCriteria("kittens") + .Add(Expression.like("name", "Iz%")) + .List<Cat>(); + + + You may specify projection and aggregation using Projection instances obtained + via the factory methods on Projections. eg: + + IList<Cat> cats = session.CreateCriteria<Cat> + .SetProjection( + Projections.ProjectionList() + .Add(Projections.RowCount()) + .Add(Projections.Avg("weight")) + .Add(Projections.Max("weight")) + .Add(Projections.Min("weight")) + .Add(Projections.GroupProperty("color"))) + .AddOrder(Order.Asc("color")) + .List<Cat>(); + + + + + + + Get the results + + A cancellation token that can be used to cancel the work + + + + + Convenience method to return a single instance that matches + the query, or null if the query returns no results. + + A cancellation token that can be used to cancel the work + the single result or + + If there is more than one matching result + + + + + Get the results and fill the + + The list to fill with the results. + A cancellation token that can be used to cancel the work + + + + Strongly-typed version of . + + A cancellation token that can be used to cancel the work + + + + Strongly-typed version of . + + A cancellation token that can be used to cancel the work + + + + Get the alias of the entity encapsulated by this criteria instance. + + The alias for the encapsulated entity. + + + + Was the read-only mode explicitly initialized? + + true if the read-only mode was explicitly initialized, otherwise false. + + /// + + + + Will entities (and proxies) loaded by this Criteria be put in read-only mode? + + + + If the read-only setting was not initialized, then the value of the session's + property is returned instead. + + + The read-only setting has no impact on entities or proxies returned by the + Criteria that existed in the session before the Criteria was executed. + + + + true if entities and proxies loaded by the criteria will be put in read-only mode, + otherwise false. + + + + + + + Used to specify that the query results will be a projection (scalar in + nature). Implicitly specifies the projection result transformer. + + The projection representing the overall "shape" of the + query results. + This instance (for method chaining) + + + The individual components contained within the given + determines the overall "shape" of the query result. + + + + + + Add an Expression to constrain the results to be retrieved. + + + + + + + An an Order to the result set + + + + + + Specify an association fetching strategy. Currently, only + one-to-many and one-to-one associations are supported. + + A dot separated property path. + The Fetch mode. + + + + + Set the lock mode of the current entity + + the lock mode + + + + + Set the lock mode of the aliased entity + + an alias + the lock mode + + + + + Join an association, assigning an alias to the joined entity + + + + + + + + Join an association using the specified join-type, assigning an alias to the joined + association + + + + The type of join to use. + this (for method chaining) + + + + Join an association using the specified join-type, assigning an alias to the joined + association + + + + The type of join to use. + The criteria to be added to the join condition (ON clause) + this (for method chaining) + + + + Create a new , "rooted" at the associated entity + + + + + + + Create a new , "rooted" at the associated entity, + using the specified join type. + + A dot-separated property path + The type of join to use + The created "sub criteria" + + + + Create a new , "rooted" at the associated entity, + assigning the given alias + + + + + + + + Create a new , "rooted" at the associated entity, + assigning the given alias and using the specified join type. + + A dot-separated property path + The alias to assign to the joined association (for later reference). + The type of join to use. + The created "sub criteria" + + + + Create a new , "rooted" at the associated entity, + assigning the given alias and using the specified join type. + + A dot-separated property path + The alias to assign to the joined association (for later reference). + The type of join to use. + The criteria to be added to the join condition (ON clause) + The created "sub criteria" + + + + Set a strategy for handling the query results. This determines the + "shape" of the query result set. + + + + + + + + + + Set a limit upon the number of objects to be retrieved + + + + + + Set the first result to be retrieved + + + + + Set a fetch size for the underlying ADO query. + the fetch size + this (for method chaining) + + + + Set a timeout for the underlying ADO.NET query. + + The timeout in seconds. + (for method chaining). + + + + Enable caching of this query result set + + + + + + + Set the name of the cache region. + + the name of a query cache region, or + for the default query cache + + + + Add a comment to the generated SQL. + a human-readable string + this (for method chaining) + + + Override the flush mode for this particular query. + The flush mode to use. + this (for method chaining) + + + Override the cache mode for this particular query. + The cache mode to use. + this (for method chaining) + + + + Get the results + + + + + + Convenience method to return a single instance that matches + the query, or null if the query returns no results. + + the single result or + + If there is more than one matching result + + + + + Get a enumerable that when enumerated will execute + a batch of queries in a single database roundtrip + + + + + + + Get an IFutureValue instance, whose value can be retrieved through + its Value property. The query is not executed until the Value property + is retrieved, which will execute other Future queries as well in a + single roundtrip + + + + + + + Set the read-only mode for entities (and proxies) loaded by this Criteria. This + setting overrides the default for the session (see ). + + + + To set the default read-only setting for entities and proxies that are loaded + into the session, see . + + + Read-only entities can be modified, but changes are not persisted. They are not + dirty-checked and snapshots of persistent state are not maintained. + + + When a proxy is initialized, the loaded entity will have the same read-only setting + as the uninitialized proxy has, regardless of the session's current setting. + + + The read-only setting has no impact on entities or proxies returned by the criteria + that existed in the session before the criteria was executed. + + + + If true, entities (and proxies) loaded by the criteria will be read-only. + + this (for method chaining) + + + + + + Get the results and fill the + + The list to fill with the results. + + + + Strongly-typed version of . + + + + + Strongly-typed version of . + + + + + Clear all orders from criteria. + + + + + Allows to get a sub criteria by path. + Will return null if the criteria does not exists. + + The path. + + + + Allows to get a sub criteria by alias. + Will return null if the criteria does not exists + + The alias. + + + + + Gets the root entity type if available, throws otherwise + + + This is an NHibernate specific method, used by several dependent + frameworks for advance integration with NHibernate. + + + + + The IdentityGenerator for autoincrement/identity key generation. + + The this id is being generated in. + The entity the id is being generated for. + A cancellation token that can be used to cancel the work + + IdentityColumnIndicator Indicates to the Session that identity (i.e. identity/autoincrement column) + key generation should be used. + + + + + The IdentityGenerator for autoincrement/identity key generation. + + The this id is being generated in. + The entity the id is being generated for. + + IdentityColumnIndicator Indicates to the Session that identity (i.e. identity/autoincrement column) + key generation should be used. + + + + + An that returns the current identifier + assigned to an instance. + + +

+ This id generation strategy is specified in the mapping file as + <generator class="assigned" /> +

+
+
+ + + Generates a new identifier by getting the value of the identifier + for the obj parameter. + + The this id is being generated in. + The entity for which the id is being generated. + A cancellation token that can be used to cancel the work + The value that was assigned to the mapped id's property. + + Thrown when a is passed in as the obj or + if the identifier of obj is null. + + + + + Generates a new identifier by getting the value of the identifier + for the obj parameter. + + The this id is being generated in. + The entity for which the id is being generated. + The value that was assigned to the mapped id's property. + + Thrown when a is passed in as the obj or + if the identifier of obj is null. + + + + + An that returns a Int64 constructed from the system + time and a counter value. Not safe for use in a clustser! May generate colliding identifiers in + a bit less than one year. + + + + + Contract for providing callback access to an , + typically from the . + + + + + Retrieve the next value from the underlying source. + + A cancellation token that can be used to cancel the work + + + + Retrieve the next value from the underlying source. + + + + + Performs optimization on an optimizable identifier generator. Typically + this optimization takes the form of trying to ensure we do not have to + hit the database on each and every request to get an identifier value. + + + + Optimizers work on constructor injection. They should provide + a constructor with the following arguments. + + - The return type for the generated values. + - int The increment size. + + + + + Generate an identifier value accounting for this specific optimization. + + Callback to access the underlying value source. + A cancellation token that can be used to cancel the work + The generated identifier value. + + + + A common means to access the last value obtained from the underlying + source. This is intended for testing purposes, since accessing the + underlying database source directly is much more difficult. + + + The last value we obtained from the underlying source; -1 indicates we have not yet consulted with the source. + + + + + Defined increment size. + + The increment size. + + + + Generate an identifier value accounting for this specific optimization. + + Callback to access the underlying value source. + The generated identifier value. + + + + Are increments to be applied to the values stored in the underlying + value source? + + + True if the values in the source are to be incremented + according to the defined increment size; false otherwise, in which + case the increment is totally an in memory construct. + + + + + Exposure intended for testing purposes. + + + + + Exposure intended for testing purposes. + + + + + Common support for optimizer implementations. + + + + + Construct an optimizer + + The expected id class. + The increment size. + + + + Optimizer which uses a pool of values, storing the next low value of the range in the database. + + Note that this optimizer works essentially the same as the HiLoOptimizer, except that here the + bucket ranges are actually encoded into the database structures. + + + Note that if you prefer that the database value be interpreted as the bottom end of our current + range, then use the PooledLoOptimizer strategy. + + + + + + Exposure intended for testing purposes. + + + + + Exposure intended for testing purposes. + + + + + Marker interface for an optimizer that wishes to know the user-specified initial value. +

+ Used instead of constructor injection since that is already a public understanding and + because not all optimizers care. +

+
+ + + Reports the user-specified initial value to the optimizer. +

+ -1 is used to indicate that the user did not specify. + The initial value specified by the user, or -1 to indicate that the + user did not specify. +

+
+ + + Describes a sequence. + + + + + Generates identifier values based on an sequence-style database structure. + Variations range from actually using a sequence to using a table to mimic + a sequence. These variations are encapsulated by the + interface internally. + + + General configuration parameters: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NAMEDEFAULTDESCRIPTION
The name of the sequence/table to use to store/retrieve values
The initial value to be stored for the given segment; the effect in terms of storage varies based on and
The increment size for the underlying segment; the effect in terms of storage varies based on and
depends on defined increment sizeAllows explicit definition of which optimization strategy to use
falseAllows explicit definition of which optimization strategy to use
+

+ Configuration parameters used specifically when the underlying structure is a table: + + + + + + + + + + + +
NAMEDEFAULTDESCRIPTION
The name of column which holds the sequence value for the given segment
+ + + +

+ Determine the name of the sequence (or table if this resolves to a physical table) to use. + Called during configuration. + + + + +
+ + + Determine the name of the column used to store the generator value in + the db. Called during configuration, if a physical table is being used. + + + + + Determine the initial sequence value to use. This value is used when + initializing the database structure (i.e. sequence/table). Called + during configuration. + + + + + Determine the increment size to be applied. The exact implications of + this value depends on the optimizer being used. Called during configuration. + + + + + Determine the optimizer to use. Called during configuration. + + + + + In certain cases we need to adjust the increment size based on the + selected optimizer. This is the hook to achieve that. + + The determined optimizer strategy. + The determined, unadjusted, increment size. + + + + Do we require a sequence with the ability to set initialValue and incrementSize + larger than 1? + + + + + An enhanced version of table-based id generation. + + + Unlike the simplistic legacy one (which, btw, was only ever intended for subclassing + support) we "segment" the table into multiple values. Thus a single table can + actually serve as the persistent storage for multiple independent generators. One + approach would be to segment the values by the name of the entity for which we are + performing generation, which would mean that we would have a row in the generator + table for each entity name. Or any configuration really; the setup is very flexible. + + In this respect it is very similar to the legacy + MultipleHiLoPerTableGenerator (not available in NHibernate) in terms of the + underlying storage structure (namely a single table capable of holding + multiple generator values). The differentiator is, as with + as well, the externalized notion + of an optimizer. + + + NOTE that by default we use a single row for all generators (based + on ). The configuration parameter + can be used to change that to + instead default to using a row for each entity name. + + Configuration parameters: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NAMEDEFAULTDESCRIPTION
The name of the table to use to store/retrieve values
The name of column which holds the sequence value for the given segment
The name of the column which holds the segment key
The value indicating which segment is used by this generator; refers to values in the column
The data length of the column; used for schema creation
The initial value to be stored for the given segment
The increment size for the underlying segment; see the discussion on for more details.
depends on defined increment sizeAllows explicit definition of which optimization strategy to use
+
+
+ + + Type mapping for the identifier. + + + + + The name of the table in which we store this generator's persistent state. + + + + + The name of the column in which we store the segment to which each row + belongs. The value here acts as primary key. + + + + + The value in the column identified by which + corresponds to this generator instance. In other words, this value + indicates the row in which this generator instance will store values. + + + + + The size of the column identified by + in the underlying table. + + + Should really have been called 'segmentColumnLength' or even better 'segmentColumnSize'. + + + + + The name of the column in which we store our persistent generator value. + + + + + The initial value to use when we find no previous state in the + generator table corresponding to this instance. + + + + + The amount of increment to use. The exact implications of this + depends on the optimizer being used, see . + + + + + The optimizer being used by this generator. This mechanism + allows avoiding calling the database each time a new identifier + is needed. + + + + + The table access count. Only really useful for unit test assertions. + + + + + Determine the table name to use for the generator values. Called during configuration. + + The parameters supplied in the generator config (plus some standard useful extras). + The dialect + + + + Determine the name of the column used to indicate the segment for each + row. This column acts as the primary key. + Called during configuration. + + The parameters supplied in the generator config (plus some standard useful extras). + The + + + + Determine the name of the column in which we will store the generator persistent value. + Called during configuration. + + + + + Determine the segment value corresponding to this generator instance. Called during configuration. + + + + + Used in the cases where is unable to + determine the value to use. + + + + + Determine the size of the segment column. + Called during configuration. + + + + + Describes a table used to mimic sequence behavior + + + + + Encapsulates definition of the underlying data structure backing a sequence-style generator. + + + + The name of the database structure (table or sequence). + + + How many times has this structure been accessed through this reference? + + + The configured increment size + + + + A callback to be able to get the next value from the underlying + structure as needed. + + The session. + The next value. + + + + Prepare this structure for use. Called sometime after instantiation, + but before first use. + + The optimizer being applied to the generator. + + + Commands needed to create the underlying structures. + The database dialect being used. + The creation commands. + + + Commands needed to drop the underlying structures. + The database dialect being used. + The drop commands. + + + + An that uses the value of + the id property of an associated object + + + + This id generation strategy is specified in the mapping file as + + <generator class="foreign"> + <param name="property">AssociatedObject</param> + </generator> + + + The mapping parameter property is required. + + + + + Generates an identifier from the value of a Property. + + The this id is being generated in. + The entity for which the id is being generated. + A cancellation token that can be used to cancel the work + + The identifier value from the associated object or + if the session + already contains obj. + + + + + Generates an identifier from the value of a Property. + + The this id is being generated in. + The entity for which the id is being generated. + + The identifier value from the associated object or + if the session + already contains obj. + + + + + Configures the ForeignGenerator by reading the value of property + from the parms parameter. + + The the identifier should be. + An of Param values that are keyed by parameter name. + The to help with Configuration. + + Thrown if the key property is not found in the parms parameter. + + + + + An that generates values + using a strategy suggested Jimmy Nilsson's + article + on informit.com. + + +

+ This id generation strategy is specified in the mapping file as + <generator class="guid.comb" /> +

+

+ The comb algorithm is designed to make the use of GUIDs as Primary Keys, Foreign Keys, + and Indexes nearly as efficient as ints. +

+

+ This code was contributed by Donald Mull. +

+
+
+ + + Generate a new using the comb algorithm. + + The this id is being generated in. + The entity for which the id is being generated. + A cancellation token that can be used to cancel the work + The new identifier as a . + + + + Generate a new using the comb algorithm. + + The this id is being generated in. + The entity for which the id is being generated. + The new identifier as a . + + + + Generate a new using the comb algorithm. + + + + + An that generates values + using Guid.NewGuid(). + + +

+ This id generation strategy is specified in the mapping file as + <generator class="guid" /> +

+
+
+ + + Generate a new for the identifier. + + The this id is being generated in. + The entity for which the id is being generated. + A cancellation token that can be used to cancel the work + The new identifier as a . + + + + Generate a new for the identifier. + + The this id is being generated in. + The entity for which the id is being generated. + The new identifier as a . + + + + Factory methods for IdentifierGenerator framework. + + +

The built in strategies for identifier generation in NHibernate are:

+ + + strategy + Implementation of strategy + + + assigned + + + + counter (or vm) + + + + foreign + + + + guid + + + + guid.comb + + + + guid.native + + + + hilo + + + + enhanced-table + + + + identity + + + + native + + Chooses between , , + and based on the + 's capabilities. + + + + seqhilo + + + + sequence + + + + enhanced-sequence + + + + sequence-identity + + + + trigger-identity + + + + uuid.hex + + + + uuid.string + + + + select + + + +
+
+ + Get the generated identifier when using identity columns + The to read the identifier value from. + The the value should be converted to. + The the value is retrieved in. + A cancellation token that can be used to cancel the work + The value for the identifier. + + + + Gets the value of the identifier from the and + ensures it is the correct . + + The to read the identifier value from. + The the value should be converted to. + The the value is retrieved in. + A cancellation token that can be used to cancel the work + + The value for the identifier. + + + Thrown if there is any problem getting the value from the + or with converting it to the . + + + + Get the generated identifier when using identity columns + The to read the identifier value from. + The the value should be converted to. + The the value is retrieved in. + The value for the identifier. + + + + Gets the value of the identifier from the and + ensures it is the correct . + + The to read the identifier value from. + The the value should be converted to. + The the value is retrieved in. + + The value for the identifier. + + + Thrown if there is any problem getting the value from the + or with converting it to the . + + + + + An where the key is the strategy and + the value is the for the strategy. + + + + + When this is returned by Generate() it indicates that the object + has already been saved. + + + String.Empty + + + + + When this is return + + + + + Initializes the static fields in . + + + + + Creates an from the named strategy. + + + The name of the generator to create. This can be one of the NHibernate abbreviations (ie - native, + sequence, guid.comb, etc...), a full class name if the Type is in the NHibernate assembly, or + a full type name if the strategy is in an external assembly. + + The that the retured identifier should be. + An of <param> values from the mapping. + The to help with Configuration. + + An instantiated and configured . + + + Thrown if there are any exceptions while creating the . + + + + + Create the correct boxed for the identifier. + + The value of the new identifier. + The the identifier should be. + + The identifier value converted to the . + + + The type parameter must be an , , + or . + + + + + An that indicates to the that identity + (ie. identity/autoincrement column) key generation should be used. + + +

+ This id generation strategy is specified in the mapping file as + <generator class="identity" /> + or if the database natively supports identity columns + <generator class="native" /> +

+

+ This indicates to NHibernate that the database generates the id when + the entity is inserted. +

+
+
+ + + Delegate for dealing with IDENTITY columns where the dialect supports returning + the generated IDENTITY value directly from the insert statement. + + + + + Delegate for dealing with IDENTITY columns where the dialect requires an + additional command execution to retrieve the generated IDENTITY value + + + + + The general contract between a class that generates unique + identifiers and the . + + + + It is not intended that this interface ever be exposed to the + application. It is intended that users implement this interface + to provide custom identifier generation strategies. + + + Implementors should provide a public default constructor. + + + Implementations that accept configuration parameters should also + implement . + + + Implementors must be threadsafe. + + + + + + Generate a new identifier + + The this id is being generated in. + The entity for which the id is being generated. + A cancellation token that can be used to cancel the work + The new identifier + + + + Generate a new identifier + + The this id is being generated in. + The entity for which the id is being generated. + The new identifier + + + + An IIdentifierGenerator that returns a Int64, constructed by + counting from the maximum primary key value at startup. Not safe for use in a + cluster! + + + + java author Gavin King, .NET port Mark Holden + + + Mapping parameters supported, but not usually needed: tables, column, schema, catalog. + + + + + + + + + + A cancellation token that can be used to cancel the work + + + + + + + + + + + + + + + + + + + + + Abstract InsertGeneratedIdentifierDelegate implementation where the + underlying strategy causes the generated identifier to be returned as an + effect of performing the insert statement. Thus, there is no need for an + additional sql statement to determine the generated identifier. + + + + + Abstract InsertGeneratedIdentifierDelegate implementation where the + underlying strategy requires an subsequent select after the insert + to determine the generated identifier. + + + + Extract the generated key value from the given result set. + The session + The result set containing the generated primary key values. + The entity being saved. + A cancellation token that can be used to cancel the work + The generated identifier + + + Bind any required parameter values into the SQL command . + The session + The prepared command + The entity being saved. + A cancellation token that can be used to cancel the work + + + Bind any required parameter values into the SQL command . + The session. + The prepared command. + The binder for the entity or collection being saved. + A cancellation token that can be used to cancel the work + + + Get the SQL statement to be used to retrieve generated key values. + The SQL command string + + + Extract the generated key value from the given result set. + The session + The result set containing the generated primary key values. + The entity being saved. + The generated identifier + + + Bind any required parameter values into the SQL command . + The session + The prepared command + The entity being saved. + + + Bind any required parameter values into the SQL command . + The session. + The prepared command. + The binder for the entity or collection being saved. + + + + Types of any required parameter values into the SQL command . + + + + + Responsible for handling delegation relating to variants in how + insert-generated-identifier generator strategies dictate processing: +
    +
  • building the sql insert statement
  • +
  • determination of the generated identifier value
  • +
+
+
+ + + Perform the indicated insert SQL statement and determine the identifier value generated. + + + + + A cancellation token that can be used to cancel the work + The generated identifier value. + + + + Build a specific to the delegate's mode + of handling generated key values. + + The insert object. + + + + Perform the indicated insert SQL statement and determine the identifier value generated. + + + + + The generated identifier value. + + + + implementation where the + underlying strategy causes the generated identifier to be returned, as an + effect of performing the insert statement, in a Output parameter. + Thus, there is no need for an additional sql statement to determine the generated identifier. + + + + + Nothing more than a distinguishing subclass of Insert used to indicate + intent. + Some subclasses of this also provided some additional + functionality or semantic to the generated SQL statement string. + + + + + Specialized IdentifierGeneratingInsert which appends the database + specific clause which signifies to return generated IDENTITY values + to the end of the insert statement. + + + + + Disable comments on insert. + + + + + Specialized IdentifierGeneratingInsert which appends the database + specific clause which signifies to return generated identifier values + to the end of the insert statement. + + + + + + + An that supports selecting by an unique key spanning + multiple properties. + + + + + Bind the parameter values of a SQL select command that performs a select based on an unique key. + + The current . + The command. + The id insertion binder. + The names of the properties which map to the column(s) to use + in the select statement restriction. If supplied, they override the persister logic for determining + them. + A cancellation token that can be used to cancel the work + thrown if are + specified on a persister which does not allow a custom key. + + + + Get a SQL select string that performs a select based on an unique key, optionnaly determined by + the given array of property names. + + The names of the properties which map to the column(s) to use + in the select statement restriction. If supplied, they override the persister logic for determining + them. + In return, the parameter types used by the select string. + The SQL select string. + thrown if are + specified on a persister which does not allow a custom key. + + + + Bind the parameter values of a SQL select command that performs a select based on an unique key. + + The current . + The command. + The id insertion binder. + The names of the properties which map to the column(s) to use + in the select statement restriction. If supplied, they override the persister logic for determining + them. + thrown if are + specified on a persister which does not allow a custom key. + + + + Generates Guid values using the server side Guid function. + + + + + A generator that selects the just inserted row to determine the identifier + value assigned by the database. The correct row is located using a unique key. + + One mapping parameter is required: key (unless a natural-id is defined in the mapping). + + + The delegate for the select generation strategy. + + + + An that generates Int64 values using an + oracle-style sequence. A higher performance algorithm is + . + + +

+ This id generation strategy is specified in the mapping file as + + <generator class="sequence"> + <param name="sequence">uid_sequence</param> + <param name="schema">db_schema</param> + </generator> + +

+

+ The sequence parameter is required while the schema is optional. +

+
+
+ + + Generate an , , or + for the identifier by using a database sequence. + + The this id is being generated in. + The entity for which the id is being generated. + A cancellation token that can be used to cancel the work + The new identifier as a , , or . + + + + The name of the sequence parameter. + + + + + The parameters parameter, appended to the create sequence DDL. + For example (Oracle): INCREMENT BY 1 START WITH 1 MAXVALUE 100 NOCACHE. + + + + + Configures the SequenceGenerator by reading the value of sequence and + schema from the parms parameter. + + The the identifier should be. + An of Param values that are keyed by parameter name. + The to help with Configuration. + + + + Generate an , , or + for the identifier by using a database sequence. + + The this id is being generated in. + The entity for which the id is being generated. + The new identifier as a , , or . + + + + The SQL required to create the database objects for a SequenceGenerator. + + The to help with creating the sql. + + An array of objects that contain the Dialect specific sql to + create the necessary database objects for the SequenceGenerator. + + + + + The SQL required to remove the underlying database objects for a SequenceGenerator. + + The to help with creating the sql. + + A that will drop the database objects for the SequenceGenerator. + + + + + Return a key unique to the underlying database objects for a SequenceGenerator. + + + The configured sequence name. + + + + + An that combines a hi/lo algorithm with an underlying + oracle-style sequence that generates hi values. + + +

+ This id generation strategy is specified in the mapping file as + + <generator class="seqhilo"> + <param name="sequence">uid_sequence</param> + <param name="max_lo">max_lo_value</param> + <param name="schema">db_schema</param> + </generator> + +

+

+ The sequence parameter is required, the max_lo and schema are optional. +

+

+ The user may specify a max_lo value to determine how often new hi values are + fetched. If sequences are not avaliable, TableHiLoGenerator might be an + alternative. +

+
+
+ + + Generate an , , or + for the identifier by using a database sequence. + + The this id is being generated in. + The entity for which the id is being generated. + A cancellation token that can be used to cancel the work + The new identifier as a , , or . + + + + The name of the maximum low value parameter. + + + + + Configures the SequenceHiLoGenerator by reading the value of sequence, max_lo, + and schema from the parms parameter. + + The the identifier should be. + An of Param values that are keyed by parameter name. + The to help with Configuration. + + + + Generate an , , or + for the identifier by using a database sequence. + + The this id is being generated in. + The entity for which the id is being generated. + The new identifier as a , , or . + + + + A generator which combines sequence generation with immediate retrieval + by attaching an output parameter to the SQL command. + In this respect it works much like ANSI-SQL IDENTITY generation. + + + + + An that uses a database table to store the last + generated value. + + +

+ It is not intended that applications use this strategy directly. However, + it may be used to build other (efficient) strategies. The return type is + System.Int32 +

+

+ The hi value MUST be fetched in a separate transaction to the ISession + transaction so the generator must be able to obtain a new connection and commit it. + Hence this implementation may not be used when the user is supplying connections. +

+

+ The mapping parameters table and column are required. +

+
+
+ + + Generate a , , or + for the identifier by selecting and updating a value in a table. + + The this id is being generated in. + The entity for which the id is being generated. + A cancellation token that can be used to cancel the work + The new identifier as a , , or . + + + + An additional where clause that is added to + the queries against the table. + + + + + The name of the column parameter. + + + + + The name of the table parameter. + + + + Default column name + + + Default table name + + + + Configures the TableGenerator by reading the value of table, + column, and schema from the parms parameter. + + The the identifier should be. + An of Param values that are keyed by parameter name. + The to help with Configuration. + + + + Generate a , , or + for the identifier by selecting and updating a value in a table. + + The this id is being generated in. + The entity for which the id is being generated. + The new identifier as a , , or . + + + + The SQL required to create the database objects for a TableGenerator. + + The to help with creating the sql. + + An array of objects that contain the Dialect specific sql to + create the necessary database objects and to create the first value as 1 + for the TableGenerator. + + + + + The SQL required to remove the underlying database objects for a TableGenerator. + + The to help with creating the sql. + + A that will drop the database objects for the TableGenerator. + + + + + Return a key unique to the underlying database objects for a TableGenerator. + + + The configured table name. + + + + + An that returns an Int64, constructed using + a hi/lo algorithm. + + +

+ This id generation strategy is specified in the mapping file as + + <generator class="hilo"> + <param name="table">table</param> + <param name="column">id_column</param> + <param name="max_lo">max_lo_value</param> + <param name="schema">db_schema</param> + <param name="catalog">db_catalog</param> + <param name="where">arbitrary additional where clause</param> + </generator> + +

+

+ The table and column parameters are required, the max_lo, + schema, catalog and where are optional. +

+

+ The hi value MUST be fecthed in a separate transaction to the ISession + transaction so the generator must be able to obtain a new connection and + commit it. Hence this implementation may not be used when the user is supplying + connections. In that case a would be a + better choice (where supported). +

+
+
+ + + Generate a for the identifier by selecting and updating a value in a table. + + The this id is being generated in. + The entity for which the id is being generated. + A cancellation token that can be used to cancel the work + The new identifier as a . + + + + The name of the max lo parameter. + + + + + Configures the TableHiLoGenerator by reading the value of table, + column, max_lo, and schema from the parms parameter. + + The the identifier should be. + An of Param values that are keyed by parameter name. + The to help with Configuration. + + + + Generate a for the identifier by selecting and updating a value in a table. + + The this id is being generated in. + The entity for which the id is being generated. + The new identifier as a . + + + + An that returns a string of length + 32, 36, or 38 depending on the configuration. + + +

+ This id generation strategy is specified in the mapping file as + + <generator class="uuid.hex"> + <param name="format">format_string</param> + <param name="separator">separator_string</param> + </generator> + +

+

+ The format and separator parameters are optional. +

+

+ The identifier string will consist of only hex digits. Optionally, the identifier string + may be generated with enclosing characters and separators between each component + of the UUID. If there are separators then the string length will be 36. If a format + that has enclosing brackets is used, then the string length will be 38. +

+

+ format is either + "N" (xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx), + "D" (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx), + "B" ({xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}), + or "P" ((xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)). These formats are described in + the Guid.ToString(String) method. + If no format is specified the default is "N". +

+

+ separator is the char that will replace the "-" if specified. If no value is + configured then the default separator for the format will be used. If the format "D", "B", or + "P" is specified, then the separator will replace the "-". If the format is "N" then this + parameter will be ignored. +

+

+ This class is based on +

+
+
+ + + Generate a new for the identifier using the "uuid.hex" algorithm. + + The this id is being generated in. + The entity for which the id is being generated. + A cancellation token that can be used to cancel the work + The new identifier as a . + + + + Generate a new for the identifier using the "uuid.hex" algorithm. + + The this id is being generated in. + The entity for which the id is being generated. + The new identifier as a . + + + + Configures the UUIDHexGenerator by reading the value of format and + separator from the parms parameter. + + The the identifier should be. + An of Param values that are keyed by parameter name. + The to help with Configuration. + + + + Generate a Guid into a string using the format. + + A new Guid string + + + + An that returns a string of length + 16. + + +

+ This id generation strategy is specified in the mapping file as + <generator class="uuid.string" /> +

+ + The identifier string will NOT consist of only alphanumeric characters. Use + this only if you don't mind unreadable identifiers. + + + This impelementation was known to be incompatible with Postgres. + +
+
+ + + Generate a new for the identifier using the "uuid.string" algorithm. + + The this id is being generated in. + The entity for which the id is being generated. + A cancellation token that can be used to cancel the work + The new identifier as a . + + + + Generate a new for the identifier using the "uuid.string" algorithm. + + The this id is being generated in. + The entity for which the id is being generated. + The new identifier as a . + + + + An IdentiferGenerator that supports "configuration". + + + + + Configure this instance, given the values of parameters + specified by the user as <param> elements. + This method is called just once, followed by instantiation. + + The the identifier should be. + An of Param values that are keyed by parameter name. + The to help with Configuration. + + + + Thrown by implementation class when ID generation fails + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + The configuration parameter holding the entity name + + + The configuration parameter holding the schema name + + + + The configuration parameter holding the table name for the + generated id + + + + + The configuration parameter holding the table names for all + tables for which the id must be unique + + + + + The configuration parameter holding the primary key column + name of the generated id + + + + The configuration parameter holding the catalog name + + + + An that requires creation of database objects + All s that also implement + An have access to a special mapping parameter: schema + + + + + The SQL required to create the underlying database objects + + The to help with creating the sql. + + An array of objects that contain the sql to create the + necessary database objects. + + + + + The SQL required to remove the underlying database objects + + The to help with creating the sql. + + A that will drop the database objects. + + + + + Return a key unique to the underlying database objects. + + + A key unique to the underlying database objects. + + + Prevents us from trying to create/remove them multiple times + + + + + A persister that may have an identity assigned by execution of a SQL INSERT. + + + + + Get the database-specific SQL command to retrieve the last + generated IDENTITY value. + + + + The names of the primary key columns in the root table. + The primary key column names. + + + + Get a SQL select string that performs a select based on a unique + key determined by the given property name). + + + The name of the property which maps to the + column(s) to use in the select statement restriction. + + The SQL select string + + + + Get the identifier type + + + + + A generator that uses an output parameter to return the identifier generated by the insert + on database server side. + + + + + Abstract implementation of the IQuery interface. + + + + + Perform parameter validation. Used prior to executing the encapsulated query. + + + if true, the first ? will not be verified since + its needed for e.g. callable statements returning a out parameter + + + + + Guesses the from the param's value. + + The object to guess the of. + An for the object. + + Thrown when the param is null because the + can't be guess from a null value. + + + + + Guesses the from the . + + The to guess the of. + An for the . + + Thrown when the clazz is null because the + can't be guess from a null type. + + + + + Warning: adds new parameters to the argument by side-effect, as well as mutating the query string! + + + + + Warning: adds new parameters to the argument by side-effect, as well as mutating the query string! + + + + + + + + + + Override the current session cache mode, just for this query. + + The cache mode to use. + this (for method chaining) + + + + Warning: adds new parameters to the argument by side-effect, as well as mutating the query expression tree! + + + + Functionality common to stateless and stateful sessions + + + + detect in-memory changes, determine if the changes are to tables + named in the query and, if so, complete execution the flush + + + A cancellation token that can be used to cancel the work + Returns true if flush was executed + + + Get the current NHibernate transaction. + + + + + + + + + + + + + + + + detect in-memory changes, determine if the changes are to tables + named in the query and, if so, complete execution the flush + + + Returns true if flush was executed + + + + If not nested in another call to BeginProcess on this session, check and update the + session status and set its session id in context. + + + If not already processing, an object to dispose for signaling the end of the process. + Otherwise, . + + + + + If not nested in a call to BeginProcess on this session, set its session id in context. + + + If not already processing, an object to dispose for restoring the previous session id. + Otherwise, . + + + + + + + + Begin a NHibernate transaction + + A NHibernate transaction + + + + Begin a NHibernate transaction with the specified isolation level + + The isolation level + A NHibernate transaction + + + + Creates a new Linq for the entity class. + + The entity class + An instance + + + + Creates a new Linq for the entity class and with given entity name. + + The type of entity to query. + The entity name. + An instance + + + + Implementation of the interface for collection filters. + + + + + Implementation of the interface + + + + + Entity name for "Entity Join" - join for entity with not mapped association + + + + + Is this an Entity join for not mapped association + + + + Override the cache mode for this particular query. + The cache mode to use. + this (for method chaining) + + + + The Clone is supported only by a root criteria. + + The clone of the root criteria. + + + + + + + + + + + + Override the cache mode for this particular query. + The cache mode to use. + this (for method chaining) + + + + Initializes a new instance of the class. + + The session. + The factory. + + + + Set a timeout for the underlying ADO.NET query. + + The timeout in seconds. + (for method chaining). + + + + Return the query results of all the queries + + A cancellation token that can be used to cancel the work + + + + Return the query results of all the queries + + + + + Concrete implementation of a SessionFactory. + + + Has the following responsibilities: + + + Caches configuration settings (immutably) + + Caches "compiled" mappings - ie. + and + + + Caches "compiled" queries (memory sensitive cache) + + + Manages PreparedStatements/DbCommands - how true in NH? + + + Delegates DbConnection management to the + + + Factory for instances of + + + + This class must appear immutable to clients, even if it does all kinds of caching + and pooling under the covers. It is crucial that the class is not only thread safe + , but also highly concurrent. Synchronization must be used extremely sparingly. + + + + + + + + + + + Closes the session factory, releasing all held resources. + + cleans up used cache regions and "stops" the cache provider. + close the ADO.NET connection + + + A cancellation token that can be used to cancel the work + + + + NH specific : to avoid the use of entityName for generic implementation + + this is a shortcut. + + + + + + + + + + Gets the hql query identified by the name. + + The name of that identifies the query. + + A hql query or if the named + query does not exist. + + + + Get the return aliases of a query + + + + Return the names of all persistent (mapped) classes that extend or implement the + given class or interface, accounting for implicit/explicit polymorphism settings + and excluding mapped subclasses/joined-subclasses of other classes in the result. + + + + + + + + + + + Closes the session factory, releasing all held resources. + + cleans up used cache regions and "stops" the cache provider. + close the ADO.NET connection + + + + + Statistics SPI + + + Get the statistics for this session factory + + + + Gets the ICurrentSessionContext instance attached to this session factory. + + + + + Concrete implementation of an , also the central, organizing component + of NHibernate's internal implementation. + + + Exposes two interfaces: itself, to the application and + to other components of NHibernate. This is where the + hard stuff is... This class is NOT THREADSAFE. + + + + + Ensure that the locks are downgraded to + and that all of the softlocks in the have + been released. + + + + + Save a transient object. An id is generated, assigned to the object and returned + + + A cancellation token that can be used to cancel the work + + + + + Save a transient object with a manually assigned ID + + + + A cancellation token that can be used to cancel the work + + + + Delete a persistent object + + + A cancellation token that can be used to cancel the work + + + Delete a persistent object (by explicit entity name) + + + Force an immediate flush + + + Cascade merge an entity instance + + + Cascade persist an entity instance + + + Cascade persist an entity instance during the flush process + + + Cascade refresh an entity instance + + + Cascade delete an entity instance + + + + detect in-memory changes, determine if the changes are to tables + named in the query and, if so, complete execution the flush + + + A cancellation token that can be used to cancel the work + Returns true if flush was executed + + + + Load the data for the object with the specified id into a newly created object + using "for update", if supported. A new key will be assigned to the object. + This should return an existing proxy where appropriate. + + If the object does not exist in the database, an exception is thrown. + + + + + A cancellation token that can be used to cancel the work + + + Thrown when the object with the specified id does not exist in the database. + + + + + Load the data for the object with the specified id into a newly created object + using "for update", if supported. A new key will be assigned to the object. + This should return an existing proxy where appropriate. + + If the object does not exist in the database, null is returned. + + + + + A cancellation token that can be used to cancel the work + + + + + Load the data for the object with the specified id into a newly created object. + This is only called when lazily initializing a proxy. + Do NOT return a proxy. + + + + + Return the object with the specified id or throw exception if no row with that id exists. Defer the load, + return a new proxy or return an existing proxy if possible. Do not check if the object was deleted. + + + + + + + A cancellation token that can be used to cancel the work + + This can be called from commit() or at the start of a List() method. + + Perform all the necessary SQL statements in a sensible order, to allow + users to respect foreign key constraints: + + Inserts, in the order they were performed + Updates + Deletion of collection elements + Insertion of collection elements + Deletes, in the order they were performed + + + + Go through all the persistent objects and look for collections they might be + holding. If they had a nonpersistable collection, substitute a persistable one + + + + + + called by a collection that wants to initialize itself + + + + A cancellation token that can be used to cancel the work + + + + remove any hard references to the entity that are held by the infrastructure + (references held by application or other persistant instances are okay) + + + A cancellation token that can be used to cancel the work + + + + Constructor used to recreate the Session during the deserialization. + + + + + This is needed because we have to do some checking before the serialization process + begins. I don't know how to add logic in ISerializable.GetObjectData and have .net + write all of the serializable fields out. + + + + + Verify the ISession can be serialized and write the fields to the Serializer. + + + + + The fields are marked with [NonSerializable] as just a point of reference. This method + has complete control and what is serialized and those attributes are ignored. However, + this method should be in sync with the attributes for easy readability. + + + + + Once the entire object graph has been deserialized then we can hook the + collections, proxies, and entities back up to the ISession. + + + + + + Constructor used for OpenSession(...) processing, as well as construction + of sessions for GetCurrentSession(). + + The factory from which this session was obtained. + The options of the session. + + + + Close the session and release all resources + + Do not call this method inside a transaction scope, use Dispose instead, since + Close() is not aware of distributed transactions + + + + + + Ensure that the locks are downgraded to + and that all of the softlocks in the have + been released. + + + + + Save a transient object. An id is generated, assigned to the object and returned + + + + + + + Save a transient object with a manually assigned ID + + + + + + + Delete a persistent object + + + + + Delete a persistent object (by explicit entity name) + + + Get the ActionQueue for this session + + + + Give the interceptor an opportunity to override the default instantiation + + + + + + + Force an immediate flush + + + Cascade merge an entity instance + + + Cascade persist an entity instance + + + Cascade persist an entity instance during the flush process + + + Cascade refresh an entity instance + + + Cascade delete an entity instance + + + + + + + + + + detect in-memory changes, determine if the changes are to tables + named in the query and, if so, complete execution the flush + + + Returns true if flush was executed + + + + Load the data for the object with the specified id into a newly created object + using "for update", if supported. A new key will be assigned to the object. + This should return an existing proxy where appropriate. + + If the object does not exist in the database, an exception is thrown. + + + + + + + Thrown when the object with the specified id does not exist in the database. + + + + + Load the data for the object with the specified id into a newly created object + using "for update", if supported. A new key will be assigned to the object. + This should return an existing proxy where appropriate. + + If the object does not exist in the database, null is returned. + + + + + + + + + Load the data for the object with the specified id into a newly created object. + This is only called when lazily initializing a proxy. + Do NOT return a proxy. + + + + + Return the object with the specified id or throw exception if no row with that id exists. Defer the load, + return a new proxy or return an existing proxy if possible. Do not check if the object was deleted. + + + + + + + + This can be called from commit() or at the start of a List() method. + + Perform all the necessary SQL statements in a sensible order, to allow + users to respect foreign key constraints: + + Inserts, in the order they were performed + Updates + Deletion of collection elements + Insertion of collection elements + Deletes, in the order they were performed + + + + Go through all the persistent objects and look for collections they might be + holding. If they had a nonpersistable collection, substitute a persistable one + + + + + + Not for internal use + + + + + + + Get the id value for an object that is actually associated with the session. + This is a bit stricter than GetEntityIdentifierIfNotUnsaved(). + + + + + + + called by a collection that wants to initialize itself + + + + + + + + + + Finalizer that ensures the object is correctly disposed of. + + + + + Perform a soft (distributed transaction aware) close of the session + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + Indicates if this Session is being Disposed of or Finalized. + + If this Session is being Finalized (isDisposing==false) then make sure not + to call any methods that could potentially bring this Session back to life. + + + + + remove any hard references to the entity that are held by the infrastructure + (references held by application or other persistant instances are okay) + + + + + Get the statistics for this session. + + + Retrieves the configured event listeners from this event source. + + + + + + + + + + + + + Implements SQL query passthrough + + + An example mapping is: + + <sql-query-name name="mySqlQuery"> + <return alias="person" class="eg.Person" /> + SELECT {person}.NAME AS {person.name}, {person}.AGE AS {person.age}, {person}.SEX AS {person.sex} + FROM PERSON {person} WHERE {person}.NAME LIKE 'Hiber%' + </sql-query-name> + + + + + Constructs a SQLQueryImpl given a sql query defined in the mappings. + The representation of the defined sql-query. + The session to which this SQLQueryImpl belongs. + Metadata about parameters found in the query. + + + Insert a entity. + A new transient instance + A cancellation token that can be used to cancel the work + the identifier of the instance + + + Insert a row. + The entityName for the entity to be inserted + a new transient instance + A cancellation token that can be used to cancel the work + the identifier of the instance + + + Update a entity. + a detached entity instance + A cancellation token that can be used to cancel the work + + + Update a entity. + The entityName for the entity to be updated + a detached entity instance + A cancellation token that can be used to cancel the work + + + Delete a entity. + a detached entity instance + A cancellation token that can be used to cancel the work + + + Delete a entity. + The entityName for the entity to be deleted + a detached entity instance + A cancellation token that can be used to cancel the work + + + Retrieve a entity. + a detached entity instance + + + Retrieve a entity. + + + a detached entity instance + + + + + Retrieve a entity, obtaining the specified lock mode. + + a detached entity instance + + + + Retrieve a entity, obtaining the specified lock mode. + + a detached entity instance + + + + Refresh the entity instance state from the database. + + The entity to be refreshed. + A cancellation token that can be used to cancel the work + + + + Refresh the entity instance state from the database. + + The entityName for the entity to be refreshed. + The entity to be refreshed. + A cancellation token that can be used to cancel the work + + + + Refresh the entity instance state from the database. + + The entity to be refreshed. + The LockMode to be applied. + A cancellation token that can be used to cancel the work + + + + Refresh the entity instance state from the database. + + The entityName for the entity to be refreshed. + The entity to be refreshed. + The LockMode to be applied. + A cancellation token that can be used to cancel the work + + + + Gets the stateless session implementation. + + + This method is provided in order to get the NHibernate implementation of the session from wrapper implementations. + Implementors of the interface should return the NHibernate implementation of this method. + + + An NHibernate implementation of the interface + + + + Close the stateless session and release the ADO.NET connection. + + + Insert a entity. + A new transient instance + the identifier of the instance + + + Insert a row. + The entityName for the entity to be inserted + a new transient instance + the identifier of the instance + + + Update a entity. + a detached entity instance + + + Update a entity. + The entityName for the entity to be updated + a detached entity instance + + + Delete a entity. + a detached entity instance + + + Delete a entity. + The entityName for the entity to be deleted + a detached entity instance + + + Retrieve a entity. + a detached entity instance + + + Retrieve a entity. + + + a detached entity instance + + + + + Retrieve a entity, obtaining the specified lock mode. + + a detached entity instance + + + + Retrieve a entity, obtaining the specified lock mode. + + a detached entity instance + + + + Refresh the entity instance state from the database. + + The entity to be refreshed. + + + + Refresh the entity instance state from the database. + + The entityName for the entity to be refreshed. + The entity to be refreshed. + + + + Refresh the entity instance state from the database. + + The entity to be refreshed. + The LockMode to be applied. + + + + Refresh the entity instance state from the database. + + The entityName for the entity to be refreshed. + The entity to be refreshed. + The LockMode to be applied. + + + + Create a new instance, for the given entity class, + or a superclass of an entity class. + + A class, which is persistent, or has persistent subclasses + The . + Entities returned by the query are detached. + + + + Create a new instance, for the given entity class, + or a superclass of an entity class, with the given alias. + + A class, which is persistent, or has persistent subclasses + The alias of the entity + The . + Entities returned by the query are detached. + + + + Create a new instance, for the given entity name. + + The entity name. + The . + Entities returned by the query are detached. + + + + Create a new instance, for the given entity name, + with the given alias. + + The entity name. + The alias of the entity + The . + Entities returned by the query are detached. + + + + Finalizer that ensures the object is correctly disposed of. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + 2 + + + + Base class to create queries in "detached mode" where the NHibernate session is not available. + + + + + The behaviour of each method is basically the same of methods. + The main difference is on : + If you mix with named parameters setter, if same param name are found, + the value of the parameter setter override the value read from the POCO. + + + + + + + + + + Override the current session cache mode, just for this query. + The cache mode to use. + this (for method chaining) + + + + Fill all properties. + + The . + + Query properties are overriden/merged. + + + + + Copy all properties to a given . + + The given . + + The method use to set properties of . + + + + + Set only parameters to a given . + + The given . + + The method use to set properties of . + Existing parameters in are merged/overriden. + + + + + Clear all existing parameters and copy new parameters from a given origin. + + The origin of parameters. + The current instance + If is null. + + + + Named query in "detached mode" where the NHibernate session is not available. + + + + + + + + + Create a new instance of for a named query string defined in the mapping file. + + The name of a query defined externally. + + The query can be either in HQL or SQL format. + + + + + Get the query name. + + + + + Get an executable instance of , to actually run the query. + + + + + Creates a new DetachedNamedQuery that is a deep copy of the current instance. + + The clone. + + + + Query in "detached mode" where the NHibernate session is not available. + + + + + + + + Create a new instance of for the given query string. + + A hibernate query string + + + + Get the HQL string. + + + + + Get an executable instance of , to actually run the query. + + + + + Creates a new DetachedQuery that is a deep copy of the current instance. + + The clone. + + + + Provides an wrapper over the results of an . + + + This is the IteratorImpl in H2.0.3 + This thing is scary. It is an which returns itself as a + when GetEnumerator is called, and EnumerableImpl is disposable. Iterating over it with a foreach + will cause it to be disposed, probably unexpectedly for the developer. (https://stackoverflow.com/a/11179175/1178314) + "Fortunately", it does not currently support multiple iterations anyway. + + + + + Create an wrapper over an . + + The to enumerate over. + The used to create the . + The to use to load objects. + + The s contained in the . + The names of the columns in the . + The that should be applied to the . + Instantiator of the result holder (used for "select new SomeClass(...)" queries). + + The should already be positioned on the first record in . + + + + + Create an wrapper over an . + + The to enumerate over. + The used to create the . + The to use to load objects. + + The s contained in the . + The names of the columns in the . + The that should be applied to the . + The that should be applied to a result row or null. + The aliases that correspond to a result row. + + The should already be positioned on the first record in . + + + + + Returns an enumerator that can iterate through the query results. + + + An that can be used to iterate through the query results. + + + + + Gets the current element in the query results. + + + The current element in the query results which is either an object or + an object array. + + + If the only returns one type of Entity then an object will + be returned. If this is a multi-column resultset then an object array will be + returned. + + + + + Advances the enumerator to the next element of the query results. + + + if the enumerator was successfully advanced to the next query results + ; if the enumerator has passed the end of the query results. + + + + + A flag to indicate if Dispose() has been called. + + + + + Finalizer that ensures the object is correctly disposed of. + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + Indicates if this EnumerableImpl is being Disposed of or Finalized. + + The command is closed and the reader is disposed. This allows other ADO.NET + related actions to occur without needing to move all the way through the + EnumerableImpl. + + + + + Subquery type enumeration + + + + exact + + + all + + + some + + + + Converts lambda expressions to NHibernate criterion/order + + + + + Retrieve the property name from a supplied PropertyProjection + Note: throws if the supplied IProjection is not a PropertyProjection + + + + + Invoke the expression to extract its runtime value + + + + + Retrieves the projection for the expression + + + + + Retrieves the name of the property from a member expression + + An expression tree that can contain either a member, or a conversion from a member. + If the member is referenced from a null valued object, then the container is treated as an alias. + The name of the member property + + + + Retrieves the name of the property from a member expression (without leading member access) + + + + + Retrieves a detached criteria from an appropriate lambda expression + + Expression for detached criteria using .As<>() extension"/> + Evaluated detached criteria + + + + Convert a lambda expression to NHibernate ICriterion + + The type of the lambda expression + The lambda expression to convert + NHibernate ICriterion + + + + Convert a lambda expression to NHibernate ICriterion + + The lambda expression to convert + NHibernate ICriterion + + + + Convert a lambda expression to NHibernate Order + + The type of the lambda expression + The lambda expression to convert + The appropriate order delegate (order direction) + NHibernate Order + + + + Convert a lambda expression to NHibernate Order + + The lambda expression to convert + The appropriate order delegate (order direction) + NHibernate Order + + + + Convert a lambda expression to NHibernate Order + + The lambda expression to convert + The appropriate order delegate (order direction) + NHibernate Order + + + + Convert a lambda expression to NHibernate Order + + The lambda expression to convert + The appropriate order delegate (order direction) + The appropriate order delegate (order direction) + NHibernate Order + + + + Convert a lambda expression to NHibernate subquery AbstractCriterion + + type of member expression + type of subquery + lambda expression to convert + NHibernate.ICriterion.AbstractCriterion + + + + Convert a lambda expression to NHibernate subquery AbstractCriterion + + type of subquery + lambda expression to convert + NHibernate.ICriterion.AbstractCriterion + + + + Register a custom method for use in a QueryOver expression + + Lambda expression demonstrating call of custom method + function to convert MethodCallExpression to ICriterion + + + + Register a custom projection for use in a QueryOver expression + + Lambda expression demonstrating call of custom method + function to convert MethodCallExpression to IProjection + + + + Register a custom projection for use in a QueryOver expression + + Lambda expression demonstrating call of custom method + function to convert MethodCallExpression to IProjection + + + + Warning: adds new parameters to the argument by side-effect, as well as mutating the query expression tree! + + + + + + + + + Get the name of this filter. + + + + + Set the named parameter's value for this filter. + + The parameter's name. + The value to be applied. + This FilterImpl instance (for method chaining). + + + + Set the named parameter's value list for this filter. Used + in conjunction with IN-style filter criteria. + + The parameter's name. + The values to be expanded into an SQL IN list. + This FilterImpl instance (for method chaining). + Thrown when or are . + + + + Get the span of a value list parameter by name. if the parameter is not a value list + or if there is no such parameter. + + The parameter name. + The parameter span, or if the parameter is not a value list or + if there is no such parameter. + + + + Perform validation of the filter state. This is used to verify the + state of the filter after its enablement and before its use. + + + + + Interface for DetachedQuery implementors. + + + When you are working with queries in "detached mode" you may need some additional services like clone, + copy of parameters from another query and so on. + + + + + Copy all properties to a given . + + The given . + + Usually the implementation use to set properties to the . + This mean that existing properties are merged/overriden. + + + + + Set only parameters to a given . + + The given . + + Existing parameters are merged/overriden. + + + + + Override all properties reading new values from a given . + + The given origin. + + + + Override all parameters reading new values from a given . + + The given origin. + + + + Options for session creation. + + + + + + An extension of SessionCreationOptions for cases where the Session to be created shares + some part of the "transaction context" of another Session. + + + + + + + Helper methods for rendering log messages and exception messages + + + + + Generate small message that can be used in traces and exception messages. + + The to create the string from. + The identifier of the object. + A descriptive in the format of [classname#id] + + + + Generate small message that can be used in traces and exception messages. + + The for the class in question. + The identifier of the object. + The . + A descriptive in the format of [classname#id] + + + + Generate small message that can be used in traces and exception messages. + + The for the class in question. + The identifier of the object. + The . + The NHibernate type of the identifier. + A descriptive in the format of [classname#id] + + + + Generate small message that can be used in traces and exception messages. + + The for the class in question + The id + A descriptive in the form [FooBar#id] + + + + Generate small message that can be used in traces and exception messages. + + The for the class in question + A descriptive in the form [FooBar] + + + + Generate small message that can be used in traces and exception messages. + + The for the class in question + The id + A descriptive in the form [collectionrole#id] + + + + Generate small message that can be used in traces and exception messages. + + The for the class in question + The id + A descriptive in the form [collectionrole#id] + + + + Generate an info message string relating to a given property value + for an entity. + + The entity name + The name of the property + The property value. + An info string, in the form [Foo.bars#1] + + + + Generate an info message string relating to a particular managed + collection. Attempts to intelligently handle property-refs issues + where the collection key is not the same as the owner key. + + The persister for the collection + The collection itself + The collection key + The session + An info string, in the form [Foo.bars#1] + + + + Generate an info message string relating to a particular managed + collection. + + The persister for the collection + The id value of the owner + The session factory + An info string, in the form [Foo.bars#1] + + + + Generate an info message string relating to a particular managed collection. + + The persister for the collection + The id value of the owner + The session factory + An info string, in the form [Foo.bars#1] + + + + Generate an info message string relating to a particular entity, + based on the given entityName and id. + + The defined entity name. + The entity id value. + An info string, in the form [FooBar#1]. + + + + + + an actual entity object, not a proxy! + + + + + Default implementation of the , + for "ordinary" HQL queries (not collection filters) + + + + + + Resolves lookups and deserialization. + + + + This is used heavily be Deserialization. Currently a SessionFactory is not really serialized. + All that is serialized is it's name and uid. During Deserializaiton the serialized SessionFactory + is converted to the one contained in this object. So if you are serializing across AppDomains + you should make sure that "name" is specified for the SessionFactory in the hbm.xml file and that the + other AppDomain has a configured SessionFactory with the same name. If + you are serializing in the same AppDomain then there will be no problem because the uid will + be in this object. + + + + + + + + + Adds an Instance of the SessionFactory to the local "cache". + + The identifier of the ISessionFactory. + The name of the ISessionFactory. + The ISessionFactory. + The configured properties for the ISessionFactory. + + + + Removes the Instance of the SessionFactory from the local "cache". + + The identifier of the ISessionFactory. + The name of the ISessionFactory. + The configured properties for the ISessionFactory. + + + + Returns a Named Instance of the SessionFactory from the local "cache" identified by name. + + The name of the ISessionFactory. + An instantiated ISessionFactory. + + + + Returns an Instance of the SessionFactory from the local "cache" identified by UUID. + + The identifier of the ISessionFactory. + An instantiated ISessionFactory. + + + + We always set the result to use an async local variable, on the face of it, + it looks like it is not a valid choice, since ASP.Net and WCF may decide to switch + threads on us. But, since SessionIdLoggingContext is only used inside NH calls, and since + NH calls are either async-await or fully synchronous, this isn't an issue for us. + In addition to that, attempting to match to the current context has proven to be performance hit. + + + + + Combines several queries into a single DB call + + + + + Get all the results + + A cancellation token that can be used to cancel the work + + + + Returns the result of one of the Criteria based on the key + + The key + A cancellation token that can be used to cancel the work + + + + + Get all the results + + + + + Adds the specified criteria to the query. The result will be contained in a + + Return results in a + The criteria. + + + + + Adds the specified criteria to the query. The result will be contained in a + + The criteria. + + + + + Adds the specified criteria to the query, and associates it with the given key. The result will be contained in a + + The key + The criteria + + + + + Adds the specified detached criteria. The result will be contained in a + + The detached criteria. + + + + + Adds the specified detached criteria, and associates it with the given key. The result will be contained in a + + The key + The detached criteria + + + + + Adds the specified criteria to the query + + The criteria. + + + + + Adds the specified criteria to the query, and associates it with the given key + + The key + The criteria + + + + + Adds the specified detached criteria. + + The detached criteria. + + + + + Adds the specified detached criteria, and associates it with the given key + + The key + The detached criteria + + + + + Adds the specified IQueryOver to the query. The result will be contained in a + + Return results in a + The IQueryOver. + + + + + Adds the specified IQueryOver to the query. The result will be contained in a + + The IQueryOver. + + + + + Adds the specified IQueryOver to the query. The result will be contained in a + + The IQueryOver. + + + + + Adds the specified IQueryOver to the query, and associates it with the given key. The result will be contained in a + + The key + The IQueryOver + + + + + Adds the specified IQueryOver to the query, and associates it with the given key. The result will be contained in a + + The key + The IQueryOver + + + + + Sets whatever this criteria is cacheable. + + if set to true [cachable]. + + + + Set the cache region for the criteria + + The region + + + + + Force a cache refresh + + + + + + + Sets the result transformer for all the results in this mutli criteria instance + + The result transformer. + + + + + Returns the result of one of the Criteria based on the key + + The key + + + + + Combines several queries into a single database call + + + + + Get all the results + + A cancellation token that can be used to cancel the work + + The result is a IList of IList. + + + + + Returns the result of one of the query based on the key + + The key + A cancellation token that can be used to cancel the work + The instance for method chain. + + + + Get all the results + + + The result is a IList of IList. + + + + + Adds the specified query to the query. The result will be contained in a + + Return results in a + The query. + The instance for method chain. + + + + Add the specified HQL query to the multi query. The result will be contained in a + + The query + + + + Add the specified HQL query to the multi query, and associate it with the given key. The result will be contained in a + + The key to get results of the specific query. + The query + The instance for method chain. + + + + + Add the specified HQL Query to the multi query, and associate it with the given key. The result will be contained in a + + The key to get results of the specific query. + The query + The instance for method chain. + + + + + Add the specified HQL query to the multi query. The result will be contained in a + + The query + The instance for method chain. + + + + Add a named query to the multi query. The result will be contained in a + + The query + The instance for method chain. + + + + Add a named query to the multi query, and associate it with the given key. The result will be contained in a + + The key to get results of the specific query. + The query + The instance for method chain. + + + + + Add the specified HQL query to the multi query, and associate it with the given key + + The key to get results of the specific query. + The query + The instance for method chain. + + + + + Add the specified HQL query to the multi query + + The query + The instance for method chain. + + + + Add the specified HQL Query to the multi query, and associate it with the given key + + The key to get results of the specific query. + The query + The instance for method chain. + + + + + Add the specified HQL query to the multi query + + The instance for method chain. + + + + Add a named query to the multi query + + The query + The instance for method chain. + + + + Add a named query to the multi query, and associate it with the given key + + The key to get results of the specific query. + The query + The instance for method chain. + + + + + Enable caching of this query result set. + + Should the query results be cacheable? + The instance for method chain. + + + Set the name of the cache region. + The name of a query cache region, or + for the default query cache + The instance for method chain. + + + Should the query force a refresh of the specified query cache region? + This is particularly useful in cases where underlying data may have been + updated via a separate process (i.e., not modified through Hibernate) and + allows the application to selectively refresh the query cache regions + based on its knowledge of those events. + Should the query result in a forcible refresh of + the query cache? + The instance for method chain. + + + + Set a timeout for the underlying ADO.NET query. + + The timeout in seconds. + The instance for method chain. + + + + Bind a value to a named query parameter + + The name of the parameter + The possibly null parameter value + The NHibernate . + The instance for method chain. + + + + Bind a value to a named query parameter, guessing the NHibernate + from the class of the given object. + + The name of the parameter + The non-null parameter value + The instance for method chain. + + + + Bind multiple values to a named query parameter. This is useful for binding a list + of values to an expression such as foo.bar in (:value_list) + + The name of the parameter + A collection of values to list + The Hibernate type of the values + The instance for method chain. + + + + Bind multiple values to a named query parameter, guessing the Hibernate + type from the class of the first object in the collection. This is useful for binding a list + of values to an expression such as foo.bar in (:value_list) + + The name of the parameter + A collection of values to list + The instance for method chain. + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + The instance for method chain. + + + + Bind an instance of a array to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a array. + The instance for method chain. + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + The instance for method chain. + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + The instance for method chain. + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + The instance for method chain. + + + + Bind an instance of a to a named parameter + using an NHibernate . + + A non-null instance of a . + The name of the parameter + The instance for method chain. + Since v5.0, does no more cut fractional seconds. Use + for this + + + + Bind an instance of a to a named parameter + using an NHibernate . + + A non-null instance of a . + The name of the parameter + The instance for method chain. + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + The instance for method chain. + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + The instance for method chain. + + + + Bind an instance of a mapped persistent class to a named parameter. + + The name of the parameter + A non-null instance of a persistent class + The instance for method chain. + + + + Bind an instance of a persistent enumeration class to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a persistent enumeration + The instance for method chain. + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + The instance for method chain. + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + The instance for method chain. + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + The instance for method chain. + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + The instance for method chain. + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + The instance for method chain. + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + An instance of a . + The instance for method chain. + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + The instance for method chain. + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + The instance for method chain. + + + + Override the current session flush mode, just for this query. + + The instance for method chain. + + + + Set a strategy for handling the query results. This can be used to change + "shape" of the query result. + + + The will be applied after the transformer of each single query. + + The instance for method chain. + + + + Returns the result of one of the query based on the key + + The key + The instance for method chain. + + + + An object-oriented representation of a NHibernate query. + + + An IQuery instance is obtained by calling . + Key features of this interface include: + + + Paging: A particular page of the result set may be selected by calling + , . The generated SQL + depends on the capabilities of the . Some + Dialects are for databases that have built in paging (LIMIT) and those capabilities + will be used to limit the number of records returned by the SQL statement. + If the database does not support LIMITs then all of the records will be returned, + but the objects created will be limited to the specific results requested. + + + Named parameters + + + Ability to return 'read-only' entities + + + + Named query parameters are tokens of the form :name in the query string. For example, a + value is bound to the Int32 parameter :foo by calling: + + SetParameter("foo", foo, NHibernateUtil.Int32); + + A name may appear multiple times in the query string. + + + Unnamed parameters ? are also supported. To bind a value to an unnamed + parameter use a Set method that accepts an Int32 positional argument - numbered from + zero. + + + You may not mix and match unnamed parameters and named parameters in the same query. + + + Queries are executed by calling or . A query + may be re-executed by subsequent invocations. Its lifespan is, however, bounded by the lifespan + of the ISession that created it. + + + Implementors are not intended to be threadsafe. + + + + + + Return the query results as an . If the query contains multiple results + per row, the results are returned in an instance of object[]. + + A cancellation token that can be used to cancel the work + +

+ Entities returned as results are initialized on demand. The first SQL query returns + identifiers only. +

+

+ This is a good strategy to use if you expect a high number of the objects + returned to be already loaded in the or in the 2nd level cache. +

+
+
+ + + Strongly-typed version of . + + A cancellation token that can be used to cancel the work + + + + + + Return the query results as an . If the query contains multiple results per row, + the results are returned in an instance of object[]. + + A cancellation token that can be used to cancel the work + The filled with the results. + + This is a good strategy to use if you expect few of the objects being returned are already loaded + or if you want to fill the 2nd level cache. + + + + + Return the query results an place them into the . + + The to place the results in. + A cancellation token that can be used to cancel the work + + + + Strongly-typed version of . + + A cancellation token that can be used to cancel the work + + + + Convenience method to return a single instance that matches + the query, or null if the query returns no results. + + A cancellation token that can be used to cancel the work + the single result or + + Thrown when there is more than one matching result. + + + + + Strongly-typed version of . + + A cancellation token that can be used to cancel the work + + + + Execute the update or delete statement. + + A cancellation token that can be used to cancel the work + The number of entities updated or deleted. + + + + The query string + + + + + The NHibernate types of the query result set. + + + + Return the HQL select clause aliases (if any) + An array of aliases as strings + + + + The names of all named parameters of the query + + The parameter names, in no particular order + + + + Will entities (and proxies) returned by the query be loaded in read-only mode? + + + + If the query's read-only setting is not initialized (with ), + the value of the session's property is + returned instead. + + + The value of this property has no effect on entities or proxies returned by the + query that existed in the session before the query was executed. + + + + true if entities and proxies loaded by the query will be put in read-only mode, otherwise false. + + + + + + Return the query results as an . If the query contains multiple results + per row, the results are returned in an instance of object[]. + + +

+ Entities returned as results are initialized on demand. The first SQL query returns + identifiers only. +

+

+ This is a good strategy to use if you expect a high number of the objects + returned to be already loaded in the or in the 2nd level cache. +

+
+
+ + + Strongly-typed version of . + + + + + + + Return the query results as an . If the query contains multiple results per row, + the results are returned in an instance of object[]. + + The filled with the results. + + This is a good strategy to use if you expect few of the objects being returned are already loaded + or if you want to fill the 2nd level cache. + + + + + Return the query results an place them into the . + + The to place the results in. + + + + Strongly-typed version of . + + + + + Convenience method to return a single instance that matches + the query, or null if the query returns no results. + + the single result or + + Thrown when there is more than one matching result. + + + + + Strongly-typed version of . + + + + + Execute the update or delete statement. + + The number of entities updated or deleted. + + + + Set the maximum number of rows to retrieve. + + The maximum number of rows to retrieve. + + + + Sets the first row to retrieve. + + The first row to retrieve. + + + + Set the read-only mode for entities (and proxies) loaded by this query. This setting + overrides the default setting for the session (see ). + + + + Read-only entities can be modified, but changes are not persisted. They are not + dirty-checked and snapshots of persistent state are not maintained. + + + When a proxy is initialized, the loaded entity will have the same read-only setting + as the uninitialized proxy, regardless of the session's current setting. + + + The read-only setting has no impact on entities or proxies returned by the criteria + that existed in the session before the criteria was executed. + + + + If true, entities (and proxies) loaded by the query will be read-only. + + this (for method chaining) + + + + + Enable caching of this query result set. + + Should the query results be cacheable? + + + Set the name of the cache region. + The name of a query cache region, or + for the default query cache + + + + Set a timeout for the underlying ADO.NET query. + + The timeout in seconds. + (for method chaining). + + + Set a fetch size for the underlying ADO query. + the fetch size + + + + Set the lockmode for the objects identified by the + given alias that appears in the FROM clause. + + alias a query alias, or this for a collection filter + + + + Add a comment to the generated SQL. + a human-readable string + + + + Override the current session flush mode, just for this query. + + + + Override the current session cache mode, just for this query. + The cache mode to use. + this (for method chaining) + + + + Bind a value to an indexed parameter. + + Position of the parameter in the query, numbered from 0 + The possibly null parameter value + The NHibernate type + + + + Bind a value to a named query parameter + + The name of the parameter + The possibly null parameter value + The NHibernate . + + + + Bind a value to an indexed parameter. + + Position of the parameter in the query, numbered from 0 + The possibly null parameter value + The parameter's + + + + Bind a value to a named query parameter + + The name of the parameter + The possibly null parameter value + The parameter's + + + + Bind a value to an indexed parameter, guessing the NHibernate type from + the class of the given object. + + The position of the parameter in the query, numbered from 0 + The non-null parameter value + + + + Bind a value to a named query parameter, guessing the NHibernate + from the class of the given object. + + The name of the parameter + The non-null parameter value + + + + Bind multiple values to a named query parameter. This is useful for binding a list + of values to an expression such as foo.bar in (:value_list) + + The name of the parameter + A collection of values to list + The NHibernate type of the values + + + + Bind multiple values to a named query parameter, guessing the NHibernate + type from the class of the first object in the collection. This is useful for binding a list + of values to an expression such as foo.bar in (:value_list) + + The name of the parameter + A collection of values to list + + + + Bind the property values of the given object to named parameters of the query, + matching property names with parameter names and mapping property types to + NHibernate types using heuristics. + + Any PONO + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a array to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a array. + + + + Bind an instance of a array to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a array. + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + Since v5.0, does no more cut fractional seconds. Use + for this + + + + Bind an instance of a to a named parameter + using an NHibernate . + + A non-null instance of a . + The name of the parameter + Since v5.0, does no more cut fractional seconds. Use + for this + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + A non-null instance of a . + The name of the parameter + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a persistent enumeration class to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a persistent enumeration + + + + Bind an instance of a persistent enumeration class to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a persistent enumeration + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + An instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + An instance of a . + + + + Bind an instance of a mapped persistent class to an indexed parameter. + + Position of the parameter in the query string, numbered from 0 + A non-null instance of a persistent class + + + + Bind an instance of a mapped persistent class to a named parameter. + + The name of the parameter + A non-null instance of a persistent class + + + + Set a strategy for handling the query results. This can be used to change + "shape" of the query result. + + + + + Get a enumerable that when enumerated will execute + a batch of queries in a single database roundtrip + + + + + + + Get an IFutureValue instance, whose value can be retrieved through + its Value property. The query is not executed until the Value property + is retrieved, which will execute other Future queries as well in a + single roundtrip + + + + + + + QueryOver<TRoot> is an API for retrieving entities by composing + objects expressed using Lambda expression syntax. + + + + IList<Cat> cats = session.QueryOver<Cat>() + .Where( c => c.Name == "Tigger" ) + .And( c => c.Weight > minWeight ) ) + .List(); + + + + + + Get the results of the root type and fill the + + A cancellation token that can be used to cancel the work + The list filled with the results. + + + + Get the results of the root type and fill the + + A cancellation token that can be used to cancel the work + The list filled with the results. + + + + Short for ToRowCountQuery().SingleOrDefault<int>() + + A cancellation token that can be used to cancel the work + + + + Short for ToRowCountInt64Query().SingleOrDefault<long>() + + A cancellation token that can be used to cancel the work + + + + Convenience method to return a single instance that matches + the query, or null if the query returns no results. + + A cancellation token that can be used to cancel the work + the single result or + + If there is more than one matching result + + + + + Override type of . + + A cancellation token that can be used to cancel the work + + + + Get the results of the root type and fill the + + The list filled with the results. + + + + Get the results of the root type and fill the + + The list filled with the results. + + + + Clones the QueryOver, removes orders and paging, and projects the row-count + for the query + + + + + Clones the QueryOver, removes orders and paging, and projects the row-count (Int64) + for the query + + + + + Short for ToRowCountQuery().SingleOrDefault<int>() + + + + + Short for ToRowCountInt64Query().SingleOrDefault<long>() + + + + + Convenience method to return a single instance that matches + the query, or null if the query returns no results. + + the single result or + + If there is more than one matching result + + + + + Override type of . + + + + + Get a enumerable that when enumerated will execute + a batch of queries in a single database roundtrip + + + + + Get a enumerable that when enumerated will execute + a batch of queries in a single database roundtrip + + + + + Get an IFutureValue instance, whose value can be retrieved through + its Value property. The query is not executed until the Value property + is retrieved, which will execute other Future queries as well in a + single roundtrip + + + + + Get an IFutureValue instance, whose value can be retrieved through + its Value property. The query is not executed until the Value property + is retrieved, which will execute other Future queries as well in a + single roundtrip + + + + + Creates an exact clone of the IQueryOver + + + + + Clear all orders from the query. + + + + + Set the first result to be retrieved + + + + + + Set a limit upon the number of objects to be retrieved + + + + + + Enable caching of this query result set + + + + Override the cache mode for this particular query. + The cache mode to use. + this (for method chaining) + + + + Set the name of the cache region. + + the name of a query cache region, or + for the default query cache + + + + Set the read-only mode for entities (and proxies) loaded by this QueryOver. + (see ). + + + + + The main runtime interface between a .NET application and NHibernate. This is the central + API class abstracting the notion of a persistence service. + + + + The lifecycle of a ISession is bounded by the beginning and end of a logical + transaction. (Long transactions might span several database transactions.) + + + The main function of the ISession is to offer create, find, update, and delete operations + for instances of mapped entity classes. Instances may exist in one of two states: + + transient: not associated with any ISession + persistent: associated with a ISession + + + + Transient instances may be made persistent by calling Save(), Insert(), + or Update(). Persistent instances may be made transient by calling Delete(). + Any instance returned by a List(), Enumerable(), Load(), or Create() + method is persistent. + + + Save() results in an SQL INSERT, Delete() + in an SQL DELETE and Update() in an SQL UPDATE. Changes to + persistent instances are detected at flush time and also result in an SQL + UPDATE. + + + It is not intended that implementors be threadsafe. Instead each thread/transaction should obtain + its own instance from an ISessionFactory. + + + A ISession instance is serializable if its persistent classes are serializable + + + A typical transaction should use the following idiom: + + using (ISession session = factory.OpenSession()) + using (ITransaction tx = session.BeginTransaction()) + { + try + { + // do some work + ... + tx.Commit(); + } + catch (Exception e) + { + if (tx != null) tx.Rollback(); + throw; + } + } + + + + If the ISession throws an exception, the transaction must be rolled back and the session + discarded. The internal state of the ISession might not be consistent with the database + after the exception occurs. + + + + + + + Force the ISession to flush. + + A cancellation token that can be used to cancel the work + + Must be called at the end of a unit of work, before committing the transaction and closing + the session (Transaction.Commit() calls this method). Flushing is the process + of synchronizing the underlying persistent store with persistable state held in memory. + + + + + Does this ISession contain any changes which must be + synchronized with the database? Would any SQL be executed if + we flushed this session? May trigger save cascades, which could + cause themselves some SQL to be executed, especially if the + identity id generator is used. + + A cancellation token that can be used to cancel the work + + + The default implementation first checks if it contains saved or deleted entities to be flushed. If not, it + then delegate the check to its , which by default is + . + + + replicates all the beginning of the flush process, checking + dirtiness of entities loaded in the session and triggering their pending cascade operations in order to + detect new and removed children. This can have the side effect of performing the + of children, causing their id to be generated. Depending on their id generator, this can trigger calls to + the database and even actually insert them if using an identity generator. + + + + + + Remove this instance from the session cache. + + + Changes to the instance will not be synchronized with the database. + This operation cascades to associated instances if the association is mapped + with cascade="all" or cascade="all-delete-orphan". + + a persistent instance + A cancellation token that can be used to cancel the work + + + + Return the persistent instance of the given entity class with the given identifier, + obtaining the specified lock mode. + + A persistent class + A valid identifier of an existing persistent instance of the class + The lock level + A cancellation token that can be used to cancel the work + the persistent instance + + + + Return the persistent instance of the given entity class with the given identifier, + obtaining the specified lock mode, assuming the instance exists. + + The entity-name of a persistent class + a valid identifier of an existing persistent instance of the class + the lock level + A cancellation token that can be used to cancel the work + the persistent instance or proxy + + + + Return the persistent instance of the given entity class with the given identifier, + assuming that the instance exists. + + + You should not use this method to determine if an instance exists (use a query or + instead). Use this only to retrieve an instance + that you assume exists, where non-existence would be an actual error. + + A persistent class + A valid identifier of an existing persistent instance of the class + A cancellation token that can be used to cancel the work + The persistent instance or proxy + + + + Return the persistent instance of the given entity class with the given identifier, + obtaining the specified lock mode. + + A persistent class + A valid identifier of an existing persistent instance of the class + The lock level + A cancellation token that can be used to cancel the work + the persistent instance + + + + Return the persistent instance of the given entity class with the given identifier, + assuming that the instance exists. + + + You should not use this method to determine if an instance exists (use a query or + instead). Use this only to retrieve an instance that you + assume exists, where non-existence would be an actual error. + + A persistent class + A valid identifier of an existing persistent instance of the class + A cancellation token that can be used to cancel the work + The persistent instance or proxy + + + + Return the persistent instance of the given with the given identifier, + assuming that the instance exists. + + The entity-name of a persistent class + a valid identifier of an existing persistent instance of the class + A cancellation token that can be used to cancel the work + The persistent instance or proxy + + You should not use this method to determine if an instance exists (use + instead). Use this only to retrieve an instance that you assume exists, where non-existence + would be an actual error. + + + + + Read the persistent state associated with the given identifier into the given transient + instance. + + An "empty" instance of the persistent class + A valid identifier of an existing persistent instance of the class + A cancellation token that can be used to cancel the work + + + + Persist all reachable transient objects, reusing the current identifier + values. Note that this will not trigger the Interceptor of the Session. + + a detached instance of a persistent class + + A cancellation token that can be used to cancel the work + + + + Persist the state of the given detached instance, reusing the current + identifier value. This operation cascades to associated instances if + the association is mapped with cascade="replicate". + + + a detached instance of a persistent class + + A cancellation token that can be used to cancel the work + + + + Persist the given transient instance, first assigning a generated identifier. + + + Save will use the current value of the identifier property if the Assigned + generator is used. + + A transient instance of a persistent class + A cancellation token that can be used to cancel the work + The generated identifier + + + + Persist the given transient instance, using the given identifier. + + A transient instance of a persistent class + An unused valid identifier + A cancellation token that can be used to cancel the work + + + + Persist the given transient instance, first assigning a generated identifier. (Or + using the current value of the identifier property if the assigned + generator is used.) + + The Entity name. + a transient instance of a persistent class + A cancellation token that can be used to cancel the work + the generated identifier + + This operation cascades to associated instances if the + association is mapped with cascade="save-update". + + + + + Persist the given transient instance, using the given identifier. + + The Entity name. + a transient instance of a persistent class + An unused valid identifier + A cancellation token that can be used to cancel the work + + This operation cascades to associated instances if the + association is mapped with cascade="save-update". + + + + + Either Save() or Update() the given instance, depending upon the value of + its identifier property. + + + By default the instance is always saved. This behaviour may be adjusted by specifying + an unsaved-value attribute of the identifier property mapping + + A transient instance containing new or updated state + A cancellation token that can be used to cancel the work + + + + Either or + the given instance, depending upon resolution of the unsaved-value checks + (see the manual for discussion of unsaved-value checking). + + The name of the entity + a transient or detached instance containing new or updated state + A cancellation token that can be used to cancel the work + + + + This operation cascades to associated instances if the association is mapped + with cascade="save-update". + + + + + Either Save() or Update() the given instance, depending upon the value of + its identifier property. + + + By default the instance is always saved. This behaviour may be adjusted by specifying + an unsaved-value attribute of the identifier property mapping + + The name of the entity + A transient instance containing new or updated state + Identifier of persistent instance + A cancellation token that can be used to cancel the work + + + + Update the persistent instance with the identifier of the given transient instance. + + + If there is a persistent instance with the same identifier, an exception is thrown. If + the given transient instance has a identifier, an exception will be thrown. + + A transient instance containing updated state + A cancellation token that can be used to cancel the work + + + + Update the persistent state associated with the given identifier. + + + An exception is thrown if there is a persistent instance with the same identifier + in the current session. + + A transient instance containing updated state + Identifier of persistent instance + A cancellation token that can be used to cancel the work + + + + Update the persistent instance with the identifier of the given detached + instance. + + The Entity name. + a detached instance containing updated state + A cancellation token that can be used to cancel the work + + If there is a persistent instance with the same identifier, + an exception is thrown. This operation cascades to associated instances + if the association is mapped with cascade="save-update". + + + + + Update the persistent instance associated with the given identifier. + + The Entity name. + a detached instance containing updated state + Identifier of persistent instance + A cancellation token that can be used to cancel the work + + If there is a persistent instance with the same identifier, + an exception is thrown. This operation cascades to associated instances + if the association is mapped with cascade="save-update". + + + + + Copy the state of the given object onto the persistent object with the same + identifier. If there is no persistent instance currently associated with + the session, it will be loaded. Return the persistent instance. If the + given instance is unsaved, save a copy of and return it as a newly persistent + instance. The given instance does not become associated with the session. + This operation cascades to associated instances if the association is mapped + with cascade="merge".
+ The semantics of this method are defined by JSR-220. +
+ a detached instance with state to be copied + A cancellation token that can be used to cancel the work + an updated persistent instance +
+ + + Copy the state of the given object onto the persistent object with the same + identifier. If there is no persistent instance currently associated with + the session, it will be loaded. Return the persistent instance. If the + given instance is unsaved, save a copy of and return it as a newly persistent + instance. The given instance does not become associated with the session. + This operation cascades to associated instances if the association is mapped + with cascade="merge".
+ The semantics of this method are defined by JSR-220. +
+ Name of the entity. + a detached instance with state to be copied + A cancellation token that can be used to cancel the work + an updated persistent instance +
+ + + Copy the state of the given object onto the persistent object with the same + identifier. If there is no persistent instance currently associated with + the session, it will be loaded. Return the persistent instance. If the + given instance is unsaved, save a copy of and return it as a newly persistent + instance. The given instance does not become associated with the session. + This operation cascades to associated instances if the association is mapped + with cascade="merge".
+ The semantics of this method are defined by JSR-220. +
+ a detached instance with state to be copied + A cancellation token that can be used to cancel the work + an updated persistent instance +
+ + + Copy the state of the given object onto the persistent object with the same + identifier. If there is no persistent instance currently associated with + the session, it will be loaded. Return the persistent instance. If the + given instance is unsaved, save a copy of and return it as a newly persistent + instance. The given instance does not become associated with the session. + This operation cascades to associated instances if the association is mapped + with cascade="merge".
+ The semantics of this method are defined by JSR-220. +
+ Name of the entity. + a detached instance with state to be copied + A cancellation token that can be used to cancel the work + an updated persistent instance +
+ + + Make a transient instance persistent. This operation cascades to associated + instances if the association is mapped with cascade="persist".
+ The semantics of this method are defined by JSR-220. +
+ a transient instance to be made persistent + A cancellation token that can be used to cancel the work +
+ + + Make a transient instance persistent. This operation cascades to associated + instances if the association is mapped with cascade="persist".
+ The semantics of this method are defined by JSR-220. +
+ Name of the entity. + a transient instance to be made persistent + A cancellation token that can be used to cancel the work +
+ + + Remove a persistent instance from the datastore. + + + The argument may be an instance associated with the receiving ISession or a + transient instance with an identifier associated with existing persistent state. + + The instance to be removed + A cancellation token that can be used to cancel the work + + + + Remove a persistent instance from the datastore. The object argument may be + an instance associated with the receiving or a transient + instance with an identifier associated with existing persistent state. + This operation cascades to associated instances if the association is mapped + with cascade="delete". + + The entity name for the instance to be removed. + the instance to be removed + A cancellation token that can be used to cancel the work + + + + Delete all objects returned by the query. + + The query string + A cancellation token that can be used to cancel the work + Returns the number of objects deleted. + + + + Delete all objects returned by the query. + + The query string + A value to be written to a "?" placeholer in the query + The hibernate type of value. + A cancellation token that can be used to cancel the work + The number of instances deleted + + + + Delete all objects returned by the query. + + The query string + A list of values to be written to "?" placeholders in the query + A list of Hibernate types of the values + A cancellation token that can be used to cancel the work + The number of instances deleted + + + + Obtain the specified lock level upon the given object. + + A persistent instance + The lock level + A cancellation token that can be used to cancel the work + + + + Obtain the specified lock level upon the given object. + + The Entity name. + a persistent or transient instance + the lock level + A cancellation token that can be used to cancel the work + + This may be used to perform a version check (), to upgrade to a pessimistic + lock (), or to simply reassociate a transient instance + with a session (). This operation cascades to associated + instances if the association is mapped with cascade="lock". + + + + + Re-read the state of the given instance from the underlying database. + + + + It is inadvisable to use this to implement long-running sessions that span many + business tasks. This method is, however, useful in certain special circumstances. + + + For example, + + Where a database trigger alters the object state upon insert or update + After executing direct SQL (eg. a mass update) in the same session + After inserting a Blob or Clob + + + + A persistent instance + A cancellation token that can be used to cancel the work + + + + Re-read the state of the given instance from the underlying database, with + the given LockMode. + + + It is inadvisable to use this to implement long-running sessions that span many + business tasks. This method is, however, useful in certain special circumstances. + + a persistent or transient instance + the lock mode to use + A cancellation token that can be used to cancel the work + + + + Create a new instance of Query for the given collection and filter string + + A persistent collection + A hibernate query + A cancellation token that can be used to cancel the work + A query + + + + Return the persistent instance of the given entity class with the given identifier, or null + if there is no such persistent instance. (If the instance, or a proxy for the instance, is + already associated with the session, return that instance or proxy.) + + a persistent class + an identifier + A cancellation token that can be used to cancel the work + a persistent instance or null + + + + Return the persistent instance of the given entity class with the given identifier, or null + if there is no such persistent instance. Obtain the specified lock mode if the instance + exists. + + a persistent class + an identifier + the lock mode + A cancellation token that can be used to cancel the work + a persistent instance or null + + + + Return the persistent instance of the given named entity with the given identifier, + or null if there is no such persistent instance. (If the instance, or a proxy for the + instance, is already associated with the session, return that instance or proxy.) + + the entity name + an identifier + A cancellation token that can be used to cancel the work + a persistent instance or null + + + + Strongly-typed version of + + + + + Strongly-typed version of + + + + + Return the entity name for a persistent entity + + a persistent entity + A cancellation token that can be used to cancel the work + the entity name + + + + Obtain a builder with the ability to grab certain information from + this session. The built ISession will require its own flushes and disposal. + + The session builder. + + + + Force the ISession to flush. + + + Must be called at the end of a unit of work, before committing the transaction and closing + the session (Transaction.Commit() calls this method). Flushing is the process + of synchronizing the underlying persistent store with persistable state held in memory. + + + + + Determines at which points Hibernate automatically flushes the session. + + + For a readonly session, it is reasonable to set the flush mode to FlushMode.Never + at the start of the session (in order to achieve some extra performance). + + + + The current cache mode. + + Cache mode determines the manner in which this session can interact with + the second level cache. + + + + + Get the that created this instance. + + + + + Gets the ADO.NET connection. + + + Applications are responsible for calling commit/rollback upon the connection before + closing the ISession. + + + + + Disconnect the ISession from the current ADO.NET connection. + + + If the connection was obtained by Hibernate, close it or return it to the connection + pool. Otherwise return it to the application. This is used by applications which require + long transactions. + + The connection provided by the application or + + + + Obtain a new ADO.NET connection. + + + This is used by applications which require long transactions + + + + + Reconnect to the given ADO.NET connection. + + This is used by applications which require long transactions + An ADO.NET connection + + + + End the ISession by disconnecting from the ADO.NET connection and cleaning up. + + + It is not strictly necessary to Close() the ISession but you must + at least Disconnect() it. + + The connection provided by the application or + + + + Cancel execution of the current query. + + + May be called from one thread to stop execution of a query in another thread. + Use with care! + + + + + Is the ISession still open? + + + + + Is the session connected? + + + if the session is connected. + + + A session is considered connected if there is a (regardless + of its state) or if the field connect is true. Meaning that it will connect + at the next operation that requires a connection. + + + + + Does this ISession contain any changes which must be + synchronized with the database? Would any SQL be executed if + we flushed this session? May trigger save cascades, which could + cause themselves some SQL to be executed, especially if the + identity id generator is used. + + + + The default implementation first checks if it contains saved or deleted entities to be flushed. If not, it + then delegate the check to its , which by default is + . + + + replicates all the beginning of the flush process, checking + dirtiness of entities loaded in the session and triggering their pending cascade operations in order to + detect new and removed children. This can have the side effect of performing the + of children, causing their id to be generated. Depending on their id generator, this can trigger calls to + the database and even actually insert them if using an identity generator. + + + + + + Is the specified entity (or proxy) read-only? + + + Facade for . + + An entity (or ) + + true if the entity (or proxy) is read-only, otherwise false. + + + + + + + Change the read-only status of an entity (or proxy). + + + + Read-only entities can be modified, but changes are not persisted. They are not dirty-checked + and snapshots of persistent state are not maintained. + + + Immutable entities cannot be made read-only. + + + To set the default read-only setting for entities and proxies that are loaded + into the session, see . + + + This method a facade for . + + + An entity (or ). + If true, the entity or proxy is made read-only; if false, it is made modifiable. + + + + + + The read-only status for entities (and proxies) loaded into this Session. + + + + When a proxy is initialized, the loaded entity will have the same read-only setting + as the uninitialized proxy, regardless of the session's current setting. + + + To change the read-only setting for a particular entity or proxy that is already in + this session, see . + + + To override this session's read-only setting for entities and proxies loaded by a query, + see . + + + This method is a facade for . + + + + + + + + Return the identifier of an entity instance cached by the ISession + + + Throws an exception if the instance is transient or associated with a different + ISession + + a persistent instance + the identifier + + + + Is this instance associated with this Session? + + an instance of a persistent class + true if the given instance is associated with this Session + + + + Remove this instance from the session cache. + + + Changes to the instance will not be synchronized with the database. + This operation cascades to associated instances if the association is mapped + with cascade="all" or cascade="all-delete-orphan". + + a persistent instance + + + + Return the persistent instance of the given entity class with the given identifier, + obtaining the specified lock mode. + + A persistent class + A valid identifier of an existing persistent instance of the class + The lock level + the persistent instance + + + + Return the persistent instance of the given entity class with the given identifier, + obtaining the specified lock mode, assuming the instance exists. + + The entity-name of a persistent class + a valid identifier of an existing persistent instance of the class + the lock level + the persistent instance or proxy + + + + Return the persistent instance of the given entity class with the given identifier, + assuming that the instance exists. + + + You should not use this method to determine if an instance exists (use a query or + instead). Use this only to retrieve an instance + that you assume exists, where non-existence would be an actual error. + + A persistent class + A valid identifier of an existing persistent instance of the class + The persistent instance or proxy + + + + Return the persistent instance of the given entity class with the given identifier, + obtaining the specified lock mode. + + A persistent class + A valid identifier of an existing persistent instance of the class + The lock level + the persistent instance + + + + Return the persistent instance of the given entity class with the given identifier, + assuming that the instance exists. + + + You should not use this method to determine if an instance exists (use a query or + instead). Use this only to retrieve an instance that you + assume exists, where non-existence would be an actual error. + + A persistent class + A valid identifier of an existing persistent instance of the class + The persistent instance or proxy + + + + Return the persistent instance of the given with the given identifier, + assuming that the instance exists. + + The entity-name of a persistent class + a valid identifier of an existing persistent instance of the class + The persistent instance or proxy + + You should not use this method to determine if an instance exists (use + instead). Use this only to retrieve an instance that you assume exists, where non-existence + would be an actual error. + + + + + Read the persistent state associated with the given identifier into the given transient + instance. + + An "empty" instance of the persistent class + A valid identifier of an existing persistent instance of the class + + + + Persist all reachable transient objects, reusing the current identifier + values. Note that this will not trigger the Interceptor of the Session. + + a detached instance of a persistent class + + + + + Persist the state of the given detached instance, reusing the current + identifier value. This operation cascades to associated instances if + the association is mapped with cascade="replicate". + + + a detached instance of a persistent class + + + + + Persist the given transient instance, first assigning a generated identifier. + + + Save will use the current value of the identifier property if the Assigned + generator is used. + + A transient instance of a persistent class + The generated identifier + + + + Persist the given transient instance, using the given identifier. + + A transient instance of a persistent class + An unused valid identifier + + + + Persist the given transient instance, first assigning a generated identifier. (Or + using the current value of the identifier property if the assigned + generator is used.) + + The Entity name. + a transient instance of a persistent class + the generated identifier + + This operation cascades to associated instances if the + association is mapped with cascade="save-update". + + + + + Persist the given transient instance, using the given identifier. + + The Entity name. + a transient instance of a persistent class + An unused valid identifier + + This operation cascades to associated instances if the + association is mapped with cascade="save-update". + + + + + Either Save() or Update() the given instance, depending upon the value of + its identifier property. + + + By default the instance is always saved. This behaviour may be adjusted by specifying + an unsaved-value attribute of the identifier property mapping + + A transient instance containing new or updated state + + + + Either or + the given instance, depending upon resolution of the unsaved-value checks + (see the manual for discussion of unsaved-value checking). + + The name of the entity + a transient or detached instance containing new or updated state + + + + This operation cascades to associated instances if the association is mapped + with cascade="save-update". + + + + + Either Save() or Update() the given instance, depending upon the value of + its identifier property. + + + By default the instance is always saved. This behaviour may be adjusted by specifying + an unsaved-value attribute of the identifier property mapping + + The name of the entity + A transient instance containing new or updated state + Identifier of persistent instance + + + + Update the persistent instance with the identifier of the given transient instance. + + + If there is a persistent instance with the same identifier, an exception is thrown. If + the given transient instance has a identifier, an exception will be thrown. + + A transient instance containing updated state + + + + Update the persistent state associated with the given identifier. + + + An exception is thrown if there is a persistent instance with the same identifier + in the current session. + + A transient instance containing updated state + Identifier of persistent instance + + + + Update the persistent instance with the identifier of the given detached + instance. + + The Entity name. + a detached instance containing updated state + + If there is a persistent instance with the same identifier, + an exception is thrown. This operation cascades to associated instances + if the association is mapped with cascade="save-update". + + + + + Update the persistent instance associated with the given identifier. + + The Entity name. + a detached instance containing updated state + Identifier of persistent instance + + If there is a persistent instance with the same identifier, + an exception is thrown. This operation cascades to associated instances + if the association is mapped with cascade="save-update". + + + + + Copy the state of the given object onto the persistent object with the same + identifier. If there is no persistent instance currently associated with + the session, it will be loaded. Return the persistent instance. If the + given instance is unsaved, save a copy of and return it as a newly persistent + instance. The given instance does not become associated with the session. + This operation cascades to associated instances if the association is mapped + with cascade="merge".
+ The semantics of this method are defined by JSR-220. +
+ a detached instance with state to be copied + an updated persistent instance +
+ + + Copy the state of the given object onto the persistent object with the same + identifier. If there is no persistent instance currently associated with + the session, it will be loaded. Return the persistent instance. If the + given instance is unsaved, save a copy of and return it as a newly persistent + instance. The given instance does not become associated with the session. + This operation cascades to associated instances if the association is mapped + with cascade="merge".
+ The semantics of this method are defined by JSR-220. +
+ Name of the entity. + a detached instance with state to be copied + an updated persistent instance +
+ + + Copy the state of the given object onto the persistent object with the same + identifier. If there is no persistent instance currently associated with + the session, it will be loaded. Return the persistent instance. If the + given instance is unsaved, save a copy of and return it as a newly persistent + instance. The given instance does not become associated with the session. + This operation cascades to associated instances if the association is mapped + with cascade="merge".
+ The semantics of this method are defined by JSR-220. +
+ a detached instance with state to be copied + an updated persistent instance +
+ + + Copy the state of the given object onto the persistent object with the same + identifier. If there is no persistent instance currently associated with + the session, it will be loaded. Return the persistent instance. If the + given instance is unsaved, save a copy of and return it as a newly persistent + instance. The given instance does not become associated with the session. + This operation cascades to associated instances if the association is mapped + with cascade="merge".
+ The semantics of this method are defined by JSR-220. +
+ Name of the entity. + a detached instance with state to be copied + an updated persistent instance +
+ + + Make a transient instance persistent. This operation cascades to associated + instances if the association is mapped with cascade="persist".
+ The semantics of this method are defined by JSR-220. +
+ a transient instance to be made persistent +
+ + + Make a transient instance persistent. This operation cascades to associated + instances if the association is mapped with cascade="persist".
+ The semantics of this method are defined by JSR-220. +
+ Name of the entity. + a transient instance to be made persistent +
+ + + Remove a persistent instance from the datastore. + + + The argument may be an instance associated with the receiving ISession or a + transient instance with an identifier associated with existing persistent state. + + The instance to be removed + + + + Remove a persistent instance from the datastore. The object argument may be + an instance associated with the receiving or a transient + instance with an identifier associated with existing persistent state. + This operation cascades to associated instances if the association is mapped + with cascade="delete". + + The entity name for the instance to be removed. + the instance to be removed + + + + Delete all objects returned by the query. + + The query string + Returns the number of objects deleted. + + + + Delete all objects returned by the query. + + The query string + A value to be written to a "?" placeholer in the query + The hibernate type of value. + The number of instances deleted + + + + Delete all objects returned by the query. + + The query string + A list of values to be written to "?" placeholders in the query + A list of Hibernate types of the values + The number of instances deleted + + + + Obtain the specified lock level upon the given object. + + A persistent instance + The lock level + + + + Obtain the specified lock level upon the given object. + + The Entity name. + a persistent or transient instance + the lock level + + This may be used to perform a version check (), to upgrade to a pessimistic + lock (), or to simply reassociate a transient instance + with a session (). This operation cascades to associated + instances if the association is mapped with cascade="lock". + + + + + Re-read the state of the given instance from the underlying database. + + + + It is inadvisable to use this to implement long-running sessions that span many + business tasks. This method is, however, useful in certain special circumstances. + + + For example, + + Where a database trigger alters the object state upon insert or update + After executing direct SQL (eg. a mass update) in the same session + After inserting a Blob or Clob + + + + A persistent instance + + + + Re-read the state of the given instance from the underlying database, with + the given LockMode. + + + It is inadvisable to use this to implement long-running sessions that span many + business tasks. This method is, however, useful in certain special circumstances. + + a persistent or transient instance + the lock mode to use + + + + Determine the current lock mode of the given object + + A persistent instance + The current lock mode + + + + Begin a unit of work and return the associated ITransaction object. + + + If a new underlying transaction is required, begin the transaction. Otherwise + continue the new work in the context of the existing underlying transaction. + The class of the returned object is determined by + the property transaction_factory + + A transaction instance + + + + Begin a transaction with the specified isolationLevel + + Isolation level for the new transaction + A transaction instance having the specified isolation level + + + + Get the current Unit of Work and return the associated ITransaction object. + + + + + Join the system transaction. + + + + Sessions auto-join current transaction by default on their first usage within a scope. + This can be disabled with from + a session builder obtained with . + + + This method allows to explicitly join the current transaction. It does nothing if it is already + joined. + + + Thrown if there is no current transaction. + + + + Creates a new Criteria for the entity class. + + The entity class + An ICriteria object + + + + Creates a new Criteria for the entity class with a specific alias + + The entity class + The alias of the entity + An ICriteria object + + + + Creates a new Criteria for the entity class. + + The class to Query + An ICriteria object + + + + Creates a new Criteria for the entity class with a specific alias + + The class to Query + The alias of the entity + An ICriteria object + + + + Create a new Criteria instance, for the given entity name. + + The name of the entity to Query + An ICriteria object + + + + Create a new Criteria instance, for the given entity name, + with the given alias. + + The name of the entity to Query + The alias of the entity + An ICriteria object + + + + Creates a new IQueryOver<T> for the entity class. + + The entity class + An IQueryOver<T> object + + + + Creates a new IQueryOver<T> for the entity class. + + The entity class + The alias of the entity + An IQueryOver<T> object + + + + Creates a new IQueryOver{T}; for the entity class. + + The entity class + The name of the entity to Query + An IQueryOver{T} object + + + + Creates a new IQueryOver{T} for the entity class. + + The entity class + The name of the entity to Query + The alias of the entity + An IQueryOver{T} object + + + + Create a new instance of Query for the given query string + + A hibernate query string + The query + + + + Create a new instance of Query for the given collection and filter string + + A persistent collection + A hibernate query + A query + + + + Obtain an instance of for a named query string defined in the + mapping file. + + The name of a query defined externally. + An from a named query string. + + The query can be either in HQL or SQL format. + + + + + Create a new instance of for the given SQL query string. + + a query expressed in SQL + An from the SQL string + + + + Completely clear the session. Evict all loaded instances and cancel all pending + saves, updates and deletions. Do not close open enumerables or instances of + ScrollableResults. + + + + + Return the persistent instance of the given entity class with the given identifier, or null + if there is no such persistent instance. (If the instance, or a proxy for the instance, is + already associated with the session, return that instance or proxy.) + + a persistent class + an identifier + a persistent instance or null + + + + Return the persistent instance of the given entity class with the given identifier, or null + if there is no such persistent instance. Obtain the specified lock mode if the instance + exists. + + a persistent class + an identifier + the lock mode + a persistent instance or null + + + + Return the persistent instance of the given named entity with the given identifier, + or null if there is no such persistent instance. (If the instance, or a proxy for the + instance, is already associated with the session, return that instance or proxy.) + + the entity name + an identifier + a persistent instance or null + + + + Strongly-typed version of + + + + + Strongly-typed version of + + + + + Return the entity name for a persistent entity + + a persistent entity + the entity name + + + + Enable the named filter for this current session. + + The name of the filter to be enabled. + The Filter instance representing the enabled filter. + + + + Retrieve a currently enabled filter by name. + + The name of the filter to be retrieved. + The Filter instance representing the enabled filter. + + + + Disable the named filter for the current session. + + The name of the filter to be disabled. + + + + Create a multi query, a query that can send several + queries to the server, and return all their results in a single + call. + + + An that can return + a list of all the results of all the queries. + Note that each query result is itself usually a list. + + + + + Sets the batch size of the session + + + + + + + Gets the session implementation. + + + This method is provided in order to get the NHibernate implementation of the session from wrapper implementations. + Implementors of the interface should return the NHibernate implementation of this method. + + + An NHibernate implementation of the interface + + + + + An that can return a list of all the results + of all the criterias. + + + + + Get the statistics for this session. + + + + Starts a new Session with the given entity mode in effect. This secondary + Session inherits the connection, transaction, and other context + information from the primary Session. It has to be flushed + or disposed by the developer since v5. + + Ignored. + The new session. + + + + Creates a new Linq for the entity class. + + The entity class + An instance + + + + Creates a new Linq for the entity class and with given entity name. + + The type of entity to query. + The entity name. + An instance + + + + Evict all entries from the process-level cache. This method occurs outside + of any transaction; it performs an immediate "hard" remove, so does not respect + any transaction isolation semantics of the usage strategy. Use with care. + + The session factory. + The classes of the entities to evict. + A cancellation token that can be used to cancel the work + + + + Evict all entries from the second-level cache. This method occurs outside + of any transaction; it performs an immediate "hard" remove, so does not respect + any transaction isolation semantics of the usage strategy. Use with care. + + The session factory. + The names of the entities to evict. + A cancellation token that can be used to cancel the work + + + + Evict all entries from the process-level cache. This method occurs outside + of any transaction; it performs an immediate "hard" remove, so does not respect + any transaction isolation semantics of the usage strategy. Use with care. + + The session factory. + The names of the collections to evict. + A cancellation token that can be used to cancel the work + + + + Evict all entries from the process-level cache. This method occurs outside + of any transaction; it performs an immediate "hard" remove, so does not respect + any transaction isolation semantics of the usage strategy. Use with care. + + The session factory. + The classes of the entities to evict. + + + + Evict all entries from the second-level cache. This method occurs outside + of any transaction; it performs an immediate "hard" remove, so does not respect + any transaction isolation semantics of the usage strategy. Use with care. + + The session factory. + The names of the entities to evict. + + + + Evict all entries from the process-level cache. This method occurs outside + of any transaction; it performs an immediate "hard" remove, so does not respect + any transaction isolation semantics of the usage strategy. Use with care. + + The session factory. + The names of the collections to evict. + + + + Creates ISessions. + + + + Usually an application has a single SessionFactory. Threads servicing client requests + obtain ISessions from the factory. Implementors must be threadsafe. + + + ISessionFactorys are immutable. The behaviour of a SessionFactory + is controlled by properties supplied at configuration time. + These properties are defined on Environment + + + + + + Destroy this SessionFactory and release all resources + connection pools, etc). It is the responsibility of the application + to ensure that there are no open Sessions before calling + close(). + + A cancellation token that can be used to cancel the work + + + + Evict all entries from the process-level cache. This method occurs outside + of any transaction; it performs an immediate "hard" remove, so does not respect + any transaction isolation semantics of the usage strategy. Use with care. + + + A cancellation token that can be used to cancel the work + + + + Evict an entry from the process-level cache. This method occurs outside + of any transaction; it performs an immediate "hard" remove, so does not respect + any transaction isolation semantics of the usage strategy. Use with care. + + + + A cancellation token that can be used to cancel the work + + + + Evict all entries from the second-level cache. This method occurs outside + of any transaction; it performs an immediate "hard" remove, so does not respect + any transaction isolation semantics of the usage strategy. Use with care. + + + + + Evict an entry from the second-level cache. This method occurs outside + of any transaction; it performs an immediate "hard" remove, so does not respect + any transaction isolation semantics of the usage strategy. Use with care. + + + + + Evict all entries from the process-level cache. This method occurs outside + of any transaction; it performs an immediate "hard" remove, so does not respect + any transaction isolation semantics of the usage strategy. Use with care. + + + A cancellation token that can be used to cancel the work + + + + Evict an entry from the process-level cache. This method occurs outside + of any transaction; it performs an immediate "hard" remove, so does not respect + any transaction isolation semantics of the usage strategy. Use with care. + + + + A cancellation token that can be used to cancel the work + + + + Evict any query result sets cached in the default query cache region. + + A cancellation token that can be used to cancel the work + + + + Evict any query result sets cached in the named query cache region. + + + A cancellation token that can be used to cancel the work + + + + Obtain a builder. + + The session builder. + + + + Open a on the given connection + + A connection provided by the application + A session + + Note that the second-level cache will be disabled if you + supply a ADO.NET connection. NHibernate will not be able to track + any statements you might have executed in the same transaction. + Consider implementing your own . + + + + + Create database connection and open a on it, specifying an interceptor + + A session-scoped interceptor + A session. + + + + Open a on the given connection, specifying an interceptor + + A connection provided by the application + A session-scoped interceptor + A session. + + Note that the second-level cache will be disabled if you + supply a ADO.NET connection. NHibernate will not be able to track + any statements you might have executed in the same transaction. + Consider implementing your own . + + + + + Create a database connection and open a on it + + A session. + + + + Obtain a builder. + + The session builder. + + + + Get a new . + + A stateless session + + + + Get a new for the given ADO.NET connection. + + A connection provided by the application + A stateless session + + + + Get the associated with the given entity class + + the given entity type. + The class metadata or if not found. + + + + Get the associated with the given entity name + the given entity name. + The class metadata or if not found. + + + + + Get the CollectionMetadata associated with the named collection role + + + + + + + Get all as a from entityname + to metadata object + + A dictionary from an entity name to + + + + Get all CollectionMetadata as a IDictionary from role name + to metadata object + + + + + + Destroy this SessionFactory and release all resources + connection pools, etc). It is the responsibility of the application + to ensure that there are no open Sessions before calling + close(). + + + + + Evict all entries from the process-level cache. This method occurs outside + of any transaction; it performs an immediate "hard" remove, so does not respect + any transaction isolation semantics of the usage strategy. Use with care. + + + + + + Evict an entry from the process-level cache. This method occurs outside + of any transaction; it performs an immediate "hard" remove, so does not respect + any transaction isolation semantics of the usage strategy. Use with care. + + + + + + + Evict all entries from the second-level cache. This method occurs outside + of any transaction; it performs an immediate "hard" remove, so does not respect + any transaction isolation semantics of the usage strategy. Use with care. + + + + + Evict an entry from the second-level cache. This method occurs outside + of any transaction; it performs an immediate "hard" remove, so does not respect + any transaction isolation semantics of the usage strategy. Use with care. + + + + + Evict all entries from the process-level cache. This method occurs outside + of any transaction; it performs an immediate "hard" remove, so does not respect + any transaction isolation semantics of the usage strategy. Use with care. + + + + + + Evict an entry from the process-level cache. This method occurs outside + of any transaction; it performs an immediate "hard" remove, so does not respect + any transaction isolation semantics of the usage strategy. Use with care. + + + + + + + Evict any query result sets cached in the default query cache region. + + + + + Evict any query result sets cached in the named query cache region. + + + + + + Obtain the definition of a filter by name. + + The name of the filter for which to obtain the definition. + The filter definition. + + + + Obtains the current session. + + + + The definition of what exactly "current" means is controlled by the + implementation configured for use. + + + The current session. + Indicates an issue locating a suitable current session. + + + Get the statistics for this session factory + + + Was this already closed? + + + + Obtain a set of the names of all filters defined on this SessionFactory. + + The set of filter names. + + + + A command-oriented API for performing bulk operations against a database. + + + A stateless session does not implement a first-level cache nor + interact with any second-level cache, nor does it implement + transactional write-behind or automatic dirty checking, nor do + operations cascade to associated instances. Collections are + ignored by a stateless session. Operations performed via a + stateless session bypass NHibernate's event model and + interceptors. Stateless sessions are vulnerable to data + aliasing effects, due to the lack of a first-level cache. + + For certain kinds of transactions, a stateless session may + perform slightly faster than a stateful session. + + + + Insert an entity. + A new transient instance + A cancellation token that can be used to cancel the work + The identifier of the instance + + + Insert a row. + The name of the entity to be inserted + A new transient instance + A cancellation token that can be used to cancel the work + The identifier of the instance + + + Update an entity. + A detached entity instance + A cancellation token that can be used to cancel the work + + + Update an entity. + The name of the entity to be updated + A detached entity instance + A cancellation token that can be used to cancel the work + + + Delete an entity. + A detached entity instance + A cancellation token that can be used to cancel the work + + + Delete an entity. + The name of the entity to be deleted + A detached entity instance + A cancellation token that can be used to cancel the work + + + Retrieve a entity. + A detached entity instance + + + + Retrieve an entity. + + A detached entity instance + + + + Retrieve an entity, obtaining the specified lock mode. + + A detached entity instance + + + + Retrieve an entity, obtaining the specified lock mode. + + A detached entity instance + + + + Refresh the entity instance state from the database. + + The entity to be refreshed. + A cancellation token that can be used to cancel the work + + + + Refresh the entity instance state from the database. + + The name of the entity to be refreshed. + The entity to be refreshed. + A cancellation token that can be used to cancel the work + + + + Refresh the entity instance state from the database. + + The entity to be refreshed. + The LockMode to be applied. + A cancellation token that can be used to cancel the work + + + + Refresh the entity instance state from the database. + + The name of the entity to be refreshed. + The entity to be refreshed. + The LockMode to be applied. + A cancellation token that can be used to cancel the work + + + + Returns the current ADO.NET connection associated with this instance. + + + If the session is using aggressive connection release (as in a + CMT environment), it is the application's responsibility to + close the connection returned by this call. Otherwise, the + application should not close the connection. + + + + Get the current NHibernate transaction. + + + + Is the IStatelessSession still open? + + + + + Is the session connected? + + + if the session is connected. + + + A session is considered connected if there is a (regardless + of its state) or if the field connect is true. Meaning that it will connect + at the next operation that requires a connection. + + + + + Gets the stateless session implementation. + + + This method is provided in order to get the NHibernate implementation of the session from wrapper implementations. + Implementors of the interface should return the NHibernate implementation of this method. + + + An NHibernate implementation of the interface + + + + Close the stateless session and release the ADO.NET connection. + + + Insert an entity. + A new transient instance + The identifier of the instance + + + Insert a row. + The name of the entity to be inserted + A new transient instance + The identifier of the instance + + + Update an entity. + A detached entity instance + + + Update an entity. + The name of the entity to be updated + A detached entity instance + + + Delete an entity. + A detached entity instance + + + Delete an entity. + The name of the entity to be deleted + A detached entity instance + + + Retrieve a entity. + A detached entity instance + + + + Retrieve an entity. + + A detached entity instance + + + + Retrieve an entity, obtaining the specified lock mode. + + A detached entity instance + + + + Retrieve an entity, obtaining the specified lock mode. + + A detached entity instance + + + + Refresh the entity instance state from the database. + + The entity to be refreshed. + + + + Refresh the entity instance state from the database. + + The name of the entity to be refreshed. + The entity to be refreshed. + + + + Refresh the entity instance state from the database. + + The entity to be refreshed. + The LockMode to be applied. + + + + Refresh the entity instance state from the database. + + The name of the entity to be refreshed. + The entity to be refreshed. + The LockMode to be applied. + + + + Create a new instance of Query for the given HQL query string. + + Entities returned by the query are detached. + + + + Obtain an instance of for a named query string defined in + the mapping file. + + + The query can be either in HQL or SQL format. + Entities returned by the query are detached. + + + + + Create a new instance, for the given entity class, + or a superclass of an entity class. + + A class, which is persistent, or has persistent subclasses + The . + Entities returned by the query are detached. + + + + Create a new instance, for the given entity class, + or a superclass of an entity class, with the given alias. + + A class, which is persistent, or has persistent subclasses + The alias of the entity + The . + Entities returned by the query are detached. + + + + Create a new instance, for the given entity class, + or a superclass of an entity class. + + A class, which is persistent, or has persistent subclasses + The . + Entities returned by the query are detached. + + + + Create a new instance, for the given entity class, + or a superclass of an entity class, with the given alias. + + A class, which is persistent, or has persistent subclasses + The alias of the entity + The . + Entities returned by the query are detached. + + + + Create a new instance, for the given entity name. + + The entity name. + The . + Entities returned by the query are detached. + + + + Create a new instance, for the given entity name, + with the given alias. + + The entity name. + The alias of the entity + The . + Entities returned by the query are detached. + + + + Creates a new IQueryOver<T> for the entity class. + + The entity class + An ICriteria<T> object + + + + Creates a new IQueryOver<T> for the entity class. + + The entity class + An ICriteria<T> object + + + + Create a new instance of for the given SQL query string. + Entities returned by the query are detached. + + A SQL query + The + + + + Begin a NHibernate transaction + + A NHibernate transaction + + + + Begin a NHibernate transaction with the specified isolation level + + The isolation level + A NHibernate transaction + + + + Join the system transaction. + + + + Sessions auto-join current transaction by default on their first usage within a scope. + This can be disabled with from + a session builder obtained with . + + + This method allows to explicitly join the current transaction. It does nothing if it is already + joined. + + + Thrown if there is no current transaction. + + + + Sets the batch size of the session + + The batch size. + The same instance of the session for methods chain. + + + + Creates a new Linq for the entity class. + + The entity class + An instance + + + + Creates a new Linq for the entity class and with given entity name. + + The type of entity to query. + The entity name. + An instance + + + + Allows the application to define units of work, while maintaining abstraction from the + underlying transaction implementation + + + A transaction is associated with a ISession and is usually instantiated by a call to + ISession.BeginTransaction(). A single session might span multiple transactions since + the notion of a session (a conversation between the application and the datastore) is of + coarser granularity than the notion of a transaction. However, it is intended that there be + at most one uncommitted ITransaction associated with a particular ISession + at a time. Implementors are not intended to be threadsafe. + + + + + Flush the associated ISession and end the unit of work. + + A cancellation token that can be used to cancel the work + + This method will commit the underlying transaction if and only if the transaction + was initiated by this object. + + + + + Force the underlying transaction to roll back. + + A cancellation token that can be used to cancel the work + + + + Begin the transaction with the default isolation level. + + + + + Begin the transaction with the specified isolation level. + + Isolation level of the transaction + + + + Flush the associated ISession and end the unit of work. + + + This method will commit the underlying transaction if and only if the transaction + was initiated by this object. + + + + + Force the underlying transaction to roll back. + + + + + Is the transaction in progress + + + + + Was the transaction rolled back or set to rollback only? + + + + + Was the transaction successfully committed? + + + This method could return even after successful invocation of Commit() + + + + + Enlist the in the current Transaction. + + The to enlist. + + It is okay for this to be a no op implementation. + + + + + Register a user synchronization callback for this transaction. + + The callback to register. + + + + NHibernate LINQ DML extension methods. They are meant to work with . Supplied parameters + should at least have an . and + its overloads supply such queryables. + + + + + Delete all entities selected by the specified query. The delete operation is performed in the database without reading the entities out of it. + + The type of the elements of . + The query matching the entities to delete. + A cancellation token that can be used to cancel the work + The number of deleted entities. + + + + Update all entities selected by the specified query. The update operation is performed in the database without reading the entities out of it. + + The type of the elements of . + The query matching the entities to update. + The update setters expressed as a member initialization of updated entities, e.g. + x => new Dog { Name = x.Name, Age = x.Age + 5 }. Unset members are ignored and left untouched. + A cancellation token that can be used to cancel the work + The number of updated entities. + + + + Update all entities selected by the specified query, using an anonymous initializer for specifying setters. The update operation is performed + in the database without reading the entities out of it. + + The type of the elements of . + The query matching the entities to update. + The assignments expressed as an anonymous object, e.g. + x => new { Name = x.Name, Age = x.Age + 5 }. Unset members are ignored and left untouched. + A cancellation token that can be used to cancel the work + The number of updated entities. + + + + Perform an update versioned on all entities selected by the specified query. The update operation is performed in the database without + reading the entities out of it. + + The type of the elements of . + The query matching the entities to update. + The update setters expressed as a member initialization of updated entities, e.g. + x => new Dog { Name = x.Name, Age = x.Age + 5 }. Unset members are ignored and left untouched. + A cancellation token that can be used to cancel the work + The number of updated entities. + + + + Perform an update versioned on all entities selected by the specified query, using an anonymous initializer for specifying setters. + The update operation is performed in the database without reading the entities out of it. + + The type of the elements of . + The query matching the entities to update. + The assignments expressed as an anonymous object, e.g. + x => new { Name = x.Name, Age = x.Age + 5 }. Unset members are ignored and left untouched. + A cancellation token that can be used to cancel the work + The number of updated entities. + + + + Insert all entities selected by the specified query. The insert operation is performed in the database without reading the entities out of it. + + The type of the elements of . + The type of the entities to insert. + The query matching entities source of the data to insert. + The expression projecting a source entity to the entity to insert. + A cancellation token that can be used to cancel the work + The number of inserted entities. + + + + Insert all entities selected by the specified query, using an anonymous initializer for specifying setters. + must be explicitly provided, e.g. source.InsertInto<Cat, Dog>(c => new {...}). The insert operation is performed in the + database without reading the entities out of it. + + The type of the elements of . + The type of the entities to insert. Must be explicitly provided. + The query matching entities source of the data to insert. + The expression projecting a source entity to an anonymous object representing + the entity to insert. + A cancellation token that can be used to cancel the work + The number of inserted entities. + + + + Delete all entities selected by the specified query. The delete operation is performed in the database without reading the entities out of it. + + The type of the elements of . + The query matching the entities to delete. + The number of deleted entities. + + + + Update all entities selected by the specified query. The update operation is performed in the database without reading the entities out of it. + + The type of the elements of . + The query matching the entities to update. + The update setters expressed as a member initialization of updated entities, e.g. + x => new Dog { Name = x.Name, Age = x.Age + 5 }. Unset members are ignored and left untouched. + The number of updated entities. + + + + Update all entities selected by the specified query, using an anonymous initializer for specifying setters. The update operation is performed + in the database without reading the entities out of it. + + The type of the elements of . + The query matching the entities to update. + The assignments expressed as an anonymous object, e.g. + x => new { Name = x.Name, Age = x.Age + 5 }. Unset members are ignored and left untouched. + The number of updated entities. + + + + Perform an update versioned on all entities selected by the specified query. The update operation is performed in the database without + reading the entities out of it. + + The type of the elements of . + The query matching the entities to update. + The update setters expressed as a member initialization of updated entities, e.g. + x => new Dog { Name = x.Name, Age = x.Age + 5 }. Unset members are ignored and left untouched. + The number of updated entities. + + + + Perform an update versioned on all entities selected by the specified query, using an anonymous initializer for specifying setters. + The update operation is performed in the database without reading the entities out of it. + + The type of the elements of . + The query matching the entities to update. + The assignments expressed as an anonymous object, e.g. + x => new { Name = x.Name, Age = x.Age + 5 }. Unset members are ignored and left untouched. + The number of updated entities. + + + + Initiate an update for the entities selected by the query. Return + a builder allowing to set properties and allowing to execute the update. + + The type of the elements of . + The query matching the entities to update. + An update builder. + + + + Insert all entities selected by the specified query. The insert operation is performed in the database without reading the entities out of it. + + The type of the elements of . + The type of the entities to insert. + The query matching entities source of the data to insert. + The expression projecting a source entity to the entity to insert. + The number of inserted entities. + + + + Insert all entities selected by the specified query, using an anonymous initializer for specifying setters. + must be explicitly provided, e.g. source.InsertInto<Cat, Dog>(c => new {...}). The insert operation is performed in the + database without reading the entities out of it. + + The type of the elements of . + The type of the entities to insert. Must be explicitly provided. + The query matching entities source of the data to insert. + The expression projecting a source entity to an anonymous object representing + the entity to insert. + The number of inserted entities. + + + + Initiate an insert using selected entities as a source. Return + a builder allowing to set properties to insert and allowing to execute the update. + + The type of the elements of . + The query matching the entities to update. + An update builder. + + + + An insert builder on which entities to insert can be specified. + + The type of the entities selected as source of the insert. + The type of the entities to insert. + + + + Insert the entities. The insert operation is performed in the database without reading the entities out of it. Will use + INSERT INTO [...] SELECT FROM [...] in the database. + + A cancellation token that can be used to cancel the work + The number of inserted entities. + + + + Set the specified property value and return this builder. + + The type of the property. + The property. + The expression that should be assigned to the property. + This insert builder. + + + + Set the specified property value and return this builder. + + The type of the property. + The property. + The value. + This insert builder. + + + + Insert the entities. The insert operation is performed in the database without reading the entities out of it. Will use + INSERT INTO [...] SELECT FROM [...] in the database. + + The number of inserted entities. + + + + An update builder on which values to update can be specified. + + The type of the entities to update. + + + + Update the entities. The update operation is performed in the database without reading the entities out of it. + + A cancellation token that can be used to cancel the work + The number of updated entities. + + + + Perform an update versioned on the entities. The update operation is performed in the database without reading the entities out of it. + + A cancellation token that can be used to cancel the work + The number of updated entities. + + + + Set the specified property and return this builder. + + The type of the property. + The property. + The expression that should be assigned to the property. + This update builder. + + + + Set the specified property and return this builder. + + The type of the property. + The property. + The value. + This update builder. + + + + Update the entities. The update operation is performed in the database without reading the entities out of it. + + The number of updated entities. + + + + Perform an update versioned on the entities. The update operation is performed in the database without reading the entities out of it. + + The number of updated entities. + + + + Class to hold assignments used in updates and inserts. + + The type of the entity source of the insert or to update. + The type of the entity to insert or to update. + + + + Set the specified property. + + The type of the property. + The property. + The expression that should be assigned to the property. + The current assignments list. + + + + Set the specified property. + + The type of the property. + The property. + The value. + The current assignments list. + + + + Accepts the specified visitor. + + The visitor to accept. + The query model in whose context this clause is visited. + + The index of this clause in the 's + collection. + + + + + Initializes a new instance of the class. + + The predicate used to filter data items. + + + + Gets the predicate, the expression representing the where condition by which the data items are filtered + + + + + + + + Transforms all the expressions in this clause and its child objects via the given + delegate. + + + The transformation object. This delegate is called for each + within this + clause, and those expressions will be replaced with what the delegate returns. + + + + Clones this clause. + + The clones of all query source clauses are registered with this + . + + + + + + All joins are created as outer joins. An optimization in finds + joins that may be inner joined and calls on them. + 's will + then emit the correct HQL join. + + + + + Initializes a new instance of the class. + + A name describing the items generated by the from clause. + The type of the items generated by the from clause. + + The generating data items for this + from clause. + + + + + + Accepts the specified visitor by calling its + + method. + + The visitor to accept. + The query model in whose context this clause is visited. + + The index of this clause in the 's + collection. + + + + + Gets or sets a name describing the items generated by this from clause. + + + Item names are inferred when a query expression is parsed, and they usually correspond to the variable names + present in that expression. + However, note that names are not necessarily unique within a . Use names + only for readability and debugging, not for + uniquely identifying objects. To match an + with its references, use the + property + rather than the . + + + + + Gets or sets the type of the items generated by this from clause. + + + Changing the of a + can make all + objects that + point to that invalid, so the property setter should be used + with care. + + + + + The expression generating the data items for this from clause. + + + + + Initializes a new instance of the class. + + The predicate used to filter data items. + + + + Gets the predicate, the expression representing the where condition by which the data items are filtered + + + + Clones this clause. + + The clones of all query source clauses are registered with this + . + + + + + + Transforms all the expressions in this clause and its child objects via the given + delegate. + + + The transformation object. This delegate is called for each + within this + clause, and those expressions will be replaced with what the delegate returns. + + + + + The extended that supports setting options for underlying . + + + + + Creates a copy of a current provider with set query options. + + An options setter. + A new with options. + + + + Converts the assignments into a lambda expression, which creates a Dictionary<string,object%gt;. + + + A lambda expression representing the assignments. + + + + Extract the from a given expression. + + The declaring-type of the method. + The method. + The of the no-generic method or the generic-definition for a generic-method. + + + + + Extract the from a given expression. + + The declaring-type of the method. + The method. + The of the method. + + + + Extract the from a given expression. + + The method. + The of the no-generic method or the generic-definition for a generic-method. + + + + + Extract the from a given expression. + + The method. + The of the method. + + + + Gets the field or property to be accessed. + + The declaring-type of the property. + The type of the property. + The expression representing the property getter. + The of the property. + + + + Represents an expression that has been nominated for direct inclusion in the SELECT clause. + This bypasses the standard nomination process and assumes that the expression can be converted + directly to SQL. + + + Used in the nomination of GroupBy key expressions to ensure that matching select clauses + are generated the same way. + + + + + If execute result type does not match expected final result type (implying a post execute transformer + will yield expected result type), the intermediate execute type. + + + + + Remove unwanted char-to-int conversions in binary expressions + + + The LINQ expression tree may contain unwanted type conversions that were not in the original expression written by the user. For example, + list.Where(someChar => someChar == 'A') becomes the equivalent of list.Where(someChar => (int)someChar == 55) in the expression + tree. Converting this directly to a HQL/SQL statement would yield CAST(x AS INT) which does not work in MSSQLSERVER, and possibly + other databases. + + + + + Remove redundant casts to the same type or to superclass (upcast) in , + and s + + + + + Applications of the string.Compare(a,b) and a.CompareTo(b) (for various types) + that are then immediately compared to 0 can be simplified by removing the + Compare/CompareTo method call. The comparison operator is then applied + directly to the arguments for the Compare/CompareTo call. + + + + + An AggregatingGroupBy is a query such as: + + from p in db.Products + group p by p.Category.CategoryId + into g + select new + { + g.Key, + MaxPrice = g.Max(p => p.UnitPrice) + }; + + + Where the grouping operation is being fully aggregated and hence does not create any form of hierarchy. + This class takes such queries, flattens out the re-linq sub-query and re-writes the outer select + + + + + + This class nominates sub-expression trees on the GroupBy Key expression + for inclusion in the Select clause. + + + + + Detects if an expression tree contains naked QuerySourceReferenceExpression + + + + + An AggregatingGroupJoin is a query such as: + + from c in db.Customers + join o in db.Orders on c.CustomerId equals o.Customer.CustomerId into ords + join e in db.Employees on c.Address.City equals e.Address.City into emps + select new { c.ContactName, ords = ords.Count(), emps = emps.Count() }; + + where the results of the joins are being fully aggregated and hence do not create any form of hierarchy. + This class takes such expressions and turns them into this form: + + from c in db.Customers + select new + { + c.ContactName, + ords = (from o2 in db.Orders where o2.Customer.CustomerId == c.CustomerId select o2).Count(), + emps = (from e2 in db.Employees where e2.Address.City == c.Address.City select e2).Count() + }; + + + + + + Builds HQL Equality nodes and used in joins + + + + + Performs the equivalent of a ToString() on an expression. Swaps out constants for + parameters so that, for example: + from c in Customers where c.City = "London" + generate the same key as + from c in Customers where c.City = "Madrid" + + + + + Locates constants in the expression tree and generates parameters for each one + + + + + Detects joins in Select, OrderBy and Results (GroupBy) clauses. + Replaces them with appropriate joins, maintaining reference equality between different clauses. + This allows extracted GroupBy key expression to also be replaced so that they can continue to match replaced Select expressions + + + + + If the querySource is a subquery, return the SelectClause's selector if it's + NewExpression. Otherwise, return null. + + + + + Represents a possible set of values for a computation. For example, an expression may + be null, it may be a non-null value, or we may even have a constant value that is known + precisely. This class contains operators that know how to combine these values with + each other. This class is intended to be used to provide static analysis of expressions + before we hit the database. As an example for future improvement, we could handle + ranges of numeric values. We can also improve this by handling operators such as the + comparison operators and arithmetic operators. They are currently handled by naive + null checks. + + + + + Verify that ExpressionType of both this and the other set is bool or nullable bool, + and return the negotiated type (nullable bool if either side is nullable). + + + + + Verify that ExpressionType is bool or nullable bool. + + + + + Identifies and names - using - all QueryModel query sources + + + It may seem expensive to do this as a separate visitation of the query model, but unfortunately + trying to identify query sources on the fly (i.e. while parsing the query model to generate + the HQL expression tree) means a query source may be referenced by a QuerySourceReference + before it has been identified - and named. + + + + + Analyze the select clause to determine what parts can be translated + fully to HQL, and some other properties of the clause. + + + + + The expression parts that can be converted to pure HQL. + + + + + If true after an expression have been analyzed, the + expression as a whole contain at least one method call which + cannot be converted to a registered function, i.e. it must + be executed client side. + + + + + Some conditional expressions can be reduced to just their IfTrue or IfFalse part. + + + + + Entity type to insert or update when the operation is a DML. + + + + + Replaces a specific expression in an expression tree with a replacement expression. + + The expression to search. + The expression to search for. + The expression to replace with. + + + + + Gets the member path. + + The member expression. + + + + + The WhereJoinDetector creates the joins for the where clause, including + optimizations for inner joins. + + The detector asks the following question: + Can an empty outer join ever return a record (ie. produce true in the where clause)? + If not, it's equivalent to an inner join since empty joins that can't produce true + never appear in the result set. + + A record (object) will be in the result if the evaluation of the condition in 3-value SQL + logic will return true; it will not be in the result if the result is either logical-null + or false. The difference between outer joining and inner joining is that with the latter, + objects are missing from the set on which the condition is checked. Thus, inner joins + "emulates" a result that is logical-null or false. And therefore, we can replace an outer + join with an inner join only if the resulting condition was not true on the outer join in + the first place when there was an "empty outer join" - i.e., the outer join had to add + nulls because there was no joinable record. These nulls can appear even for a column + that is not nullable. + + For example: + a.B.C == 1 could never produce true if B didn't match any rows, so it's safe to inner join. + a.B.C == null could produce true even if B didn't match any rows, so we can't inner join. + a.B.C == 1 && a.D.E == 1 can be inner joined. + a.B.C == 1 || a.D.E == 1 must be outer joined. + + By default we outer join via the code in Visit. The use of inner joins is only + an optimization hint to the database. + + More examples: + a.B.C == 1 || a.B.C == null + We don't need multiple joins for this. When we reach the ||, we ask the value sets + on either side if they have a value for when a.B.C is emptily outer joined. Both of + them do, so those values are combined. + a.B.C == 1 || a.D.E == 1 + In this case, there is no value for a.B.C on the right side, so we use the possible + values for the entire expression, ignoring specific members. We only test for the + empty outer joining of one member expression at a time, since we can't guarantee that + they will all be emptily outer joined at the same time. + a.B.C ?? a.D.E + Even though each side is null when emptily outer joined, we can't promise that a.D.E + will be emptily outer joined when a.B.C is. Therefore, despite both sides being + null, the result may not be. + + There was significant discussion on the developers mailing list regarding this topic. See also NH-2583. + + The code here is based on the excellent work started by Harald Mueller. + + + + + Possible values of expression if there's set of values for the requested member expression. + For example, if we have an expression "3" and we request the state for "a.B.C", we'll + use "3" from Values since it won't exist in MemberExpressionValuesIfEmptyOuterJoined. + + + + + Stores the possible values of an expression that would result if the given member expression + string was emptily outer joined. For example a.B.C would result in "null" if we try to + outer join to B and there are no rows. Even if an expression tree does contain a particular + member expression, it may not appear in this list. In that case, the emptily outer joined + value set for that member expression will be whatever's in Values instead. + + + + + An insert builder on which entities to insert can be specified. + + The type of the entities selected as source of the insert. + + + + Specifies the type of the entities to insert, and return an insert builder allowing to specify the values to insert. + + The type of the entities to insert. + An insert builder. + + + + If execute result type does not match expected final result type (implying a post execute transformer + will yield expected result type), the intermediate execute type. + + + + + Expose NH queryable options. + + + + + Enable caching of this query result set. + + Should the query results be cacheable? + (for method chaining). + + + + Set the name of the cache region. + + The name of a query cache region, or + for the default query cache + (for method chaining). + + + + Override the current session cache mode, just for this query. + + The cache mode to use. + (for method chaining). + + + + Set a timeout for the underlying ADO.NET query. + + The timeout in seconds. + (for method chaining). + + + + Flag a method as being a SQL function call for the linq-to-nhibernate provider. Its + parameters will be used as the function call parameters. + + + + + Default constructor. The method call will be translated by the linq provider to + a function call having the same name than the method. + + + + + Constructor specifying a SQL function name. + + The name of the SQL function. + + + + Constructor allowing to specify a for the method. + + Should the method call be pre-evaluated when not depending on + queried data? Default is . + + + + Constructor for specifying a SQL function name and a . + + The name of the SQL function. + Should the method call be pre-evaluated when not depending on + queried data? Default is . + + + + The name of the SQL function. + + + + + Can flag a method as not being callable by the runtime, when used in Linq queries. + If the method is supported by the linq-to-nhibernate provider, it will always be converted + to the corresponding SQL statement. + Otherwise the linq-to-nhibernate provider evaluates method calls when they do not depend on + the queried data. + + + + + Default constructor. + + + + + Base class for Linq extension attributes. + + + + + Should the method call be pre-evaluated when not depending on queried data? If it can, + it would then be evaluated and replaced by the resulting (parameterized) constant expression + in the resulting SQL query. + + + + + Default constructor. + + Should the method call be pre-evaluated when not depending on queried data? + + + + Possible method call behaviors when the linq to NHibernate provider pre-evaluates + expressions before translating them to SQL. + + + + + The method call will not be evaluated even if its arguments do not depend on queried data. + It will always be translated to the corresponding SQL statement. + + + + + If the method call does not depend on queried data, the method call will be evaluated and replaced + by the resulting (parameterized) constant expression in the resulting SQL query. A throwing + method implementation will cause the query to throw. + + + + + NHibernate LINQ extension methods. They are meant to work with . Supplied parameters + should at least have an . and + its overloads supply such queryables. + + + + Determines whether a sequence contains any elements. + A sequence to check for being empty. + A cancellation token that can be used to cancel the work. + The type of the elements of . + true if the source sequence contains any elements; otherwise, false. + is . + is not a . + + + Determines whether any element of a sequence satisfies a condition. + A sequence whose elements to test for a condition. + A function to test each element for a condition. + A cancellation token that can be used to cancel the work. + The type of the elements of . + true if any elements in the source sequence pass the test in the specified predicate; otherwise, false. + or is . + is not a . + + + Determines whether all elements of a sequence satisfies a condition. + A sequence whose elements to test for a condition. + A function to test each element for a condition. + A cancellation token that can be used to cancel the work. + The type of the elements of . + true if all elements in the source sequence pass the test in the specified predicate; otherwise, false. + or is . + is not a . + + + Returns the number of elements in a sequence. + The that contains the elements to be counted. + A cancellation token that can be used to cancel the work. + The type of the elements of . + The number of elements in the input sequence. + is . + is not a . + The number of elements in is larger than . + + + Returns the number of elements in the specified sequence that satisfies a condition. + An that contains the elements to be counted. + A function to test each element for a condition. + A cancellation token that can be used to cancel the work. + The type of the elements of . + The number of elements in the sequence that satisfies the condition in the predicate function. + or is . + is not a . + The number of elements in is larger than . + + + + Computes the sum of a sequence of values. + + A sequence of values to calculate the sum of. + A cancellation token that can be used to cancel the work. + + The sum of the values in the sequence. + + is . + is not a . + The sum is larger than . + + + + Computes the sum of a sequence of nullable values. + + A sequence of nullable values to calculate the sum of. + A cancellation token that can be used to cancel the work. + + The sum of the values in the sequence. + + is . + is not a . + The sum is larger than . + + + + Computes the sum of a sequence of values. + + A sequence of values to calculate the sum of. + A cancellation token that can be used to cancel the work. + + The sum of the values in the sequence. + + is . + is not a . + The sum is larger than . + + + + Computes the sum of a sequence of nullable values. + + A sequence of nullable values to calculate the sum of. + A cancellation token that can be used to cancel the work. + + The sum of the values in the sequence. + + is . + is not a . + The sum is larger than . + + + + Computes the sum of a sequence of values. + + A sequence of values to calculate the sum of. + A cancellation token that can be used to cancel the work. + + The sum of the values in the sequence. + + is . + is not a . + The sum is larger than . + + + + Computes the sum of a sequence of nullable values. + + A sequence of nullable values to calculate the sum of. + A cancellation token that can be used to cancel the work. + + The sum of the values in the sequence. + + is . + is not a . + The sum is larger than . + + + + Computes the sum of a sequence of values. + + A sequence of values to calculate the sum of. + A cancellation token that can be used to cancel the work. + + The sum of the values in the sequence. + + is . + is not a . + The sum is larger than . + + + + Computes the sum of a sequence of nullable values. + + A sequence of nullable values to calculate the sum of. + A cancellation token that can be used to cancel the work. + + The sum of the values in the sequence. + + is . + is not a . + The sum is larger than . + + + + Computes the sum of a sequence of values. + + A sequence of values to calculate the sum of. + A cancellation token that can be used to cancel the work. + + The sum of the values in the sequence. + + is . + is not a . + The sum is larger than . + + + + Computes the sum of a sequence of nullable values. + + A sequence of nullable values to calculate the sum of. + A cancellation token that can be used to cancel the work. + + The sum of the values in the sequence. + + is . + is not a . + The sum is larger than . + + + + Computes the sum of the sequence of values that is obtained by invoking a projection function on each element of the input sequence. + + A sequence of values of type . + A projection function to apply to each element. + A cancellation token that can be used to cancel the work. + The type of the elements of . + + The sum of the projected values. + + or is . + is not a . + The sum is larger than . + + + + Computes the sum of the sequence of nullable values that is obtained by invoking a projection function on each element of the input sequence. + + A sequence of values of type . + A projection function to apply to each element. + A cancellation token that can be used to cancel the work. + The type of the elements of . + + The sum of the projected values. + + or is . + is not a . + The sum is larger than . + + + + Computes the sum of the sequence of values that is obtained by invoking a projection function on each element of the input sequence. + + A sequence of values of type . + A projection function to apply to each element. + A cancellation token that can be used to cancel the work. + The type of the elements of . + + The sum of the projected values. + + or is . + is not a . + The sum is larger than . + + + + Computes the sum of the sequence of nullable values that is obtained by invoking a projection function on each element of the input sequence. + + A sequence of values of type . + A projection function to apply to each element. + A cancellation token that can be used to cancel the work. + The type of the elements of . + + The sum of the projected values. + + or is . + is not a . + The sum is larger than . + + + + Computes the sum of the sequence of values that is obtained by invoking a projection function on each element of the input sequence. + + A sequence of values of type . + A projection function to apply to each element. + A cancellation token that can be used to cancel the work. + The type of the elements of . + + The sum of the projected values. + + or is . + is not a . + The sum is larger than . + + + + Computes the sum of the sequence of nullable values that is obtained by invoking a projection function on each element of the input sequence. + + A sequence of values of type . + A projection function to apply to each element. + A cancellation token that can be used to cancel the work. + The type of the elements of . + + The sum of the projected values. + + or is . + is not a . + The sum is larger than . + + + + Computes the sum of the sequence of values that is obtained by invoking a projection function on each element of the input sequence. + + A sequence of values of type . + A projection function to apply to each element. + A cancellation token that can be used to cancel the work. + The type of the elements of . + + The sum of the projected values. + + or is . + is not a . + The sum is larger than . + + + + Computes the sum of the sequence of nullable values that is obtained by invoking a projection function on each element of the input sequence. + + A sequence of values of type . + A projection function to apply to each element. + A cancellation token that can be used to cancel the work. + The type of the elements of . + + The sum of the projected values. + + or is . + is not a . + The sum is larger than . + + + + Computes the sum of the sequence of values that is obtained by invoking a projection function on each element of the input sequence. + + A sequence of values of type . + A projection function to apply to each element. + A cancellation token that can be used to cancel the work. + The type of the elements of . + + The sum of the projected values. + + or is . + is not a . + The sum is larger than . + + + + Computes the sum of the sequence of nullable values that is obtained by invoking a projection function on each element of the input sequence. + + A sequence of values of type . + A projection function to apply to each element. + A cancellation token that can be used to cancel the work. + The type of the elements of . + + The sum of the projected values. + + or is . + is not a . + The sum is larger than . + + + + Computes the average of a sequence of values. + + A sequence of values to calculate the average of. + A cancellation token that can be used to cancel the work. + + The average of the sequence of values. + + is . + is not a . + contains no elements. + + + + Computes the average of a sequence of nullable values. + + A sequence of nullable values to calculate the average of. + A cancellation token that can be used to cancel the work. + + The average of the sequence of values, or if the source sequence is empty or contains only values. + + is . + is not a . + + + + Computes the average of a sequence of values. + + A sequence of values to calculate the average of. + A cancellation token that can be used to cancel the work. + + The average of the sequence of values. + + is . + is not a . + contains no elements. + + + + Computes the average of a sequence of nullable values. + + A sequence of nullable values to calculate the average of. + A cancellation token that can be used to cancel the work. + + The average of the sequence of values, or if the source sequence is empty or contains only values. + + is . + is not a . + + + + Computes the average of a sequence of values. + + A sequence of values to calculate the average of. + A cancellation token that can be used to cancel the work. + + The average of the sequence of values. + + is . + is not a . + contains no elements. + + + + Computes the average of a sequence of nullable values. + + A sequence of nullable values to calculate the average of. + A cancellation token that can be used to cancel the work. + + The average of the sequence of values, or if the source sequence is empty or contains only values. + + is . + is not a . + + + + Computes the average of a sequence of values. + + A sequence of values to calculate the average of. + A cancellation token that can be used to cancel the work. + + The average of the sequence of values. + + is . + is not a . + contains no elements. + + + + Computes the average of a sequence of nullable values. + + A sequence of nullable values to calculate the average of. + A cancellation token that can be used to cancel the work. + + The average of the sequence of values, or if the source sequence is empty or contains only values. + + is . + is not a . + + + + Computes the average of a sequence of values. + + A sequence of values to calculate the average of. + A cancellation token that can be used to cancel the work. + + The average of the sequence of values. + + is . + is not a . + contains no elements. + + + + Computes the average of a sequence of nullable values. + + A sequence of nullable values to calculate the average of. + A cancellation token that can be used to cancel the work. + + The average of the sequence of values, or if the source sequence is empty or contains only values. + + is . + is not a . + + + + Computes the average of a sequence of values that is obtained by invoking a projection function on each element of the input sequence. + + A sequence of values to calculate the average of. + A projection function to apply to each element. + A cancellation token that can be used to cancel the work. + The type of the elements of . + + The average of the sequence of values. + + or is . + is not a . + contains no elements. + + + + Computes the average of a sequence of nullable values that is obtained by invoking a projection function on each element of the input sequence. + + A sequence of values to calculate the average of. + A projection function to apply to each element. + A cancellation token that can be used to cancel the work. + The type of the elements of . + + The average of the sequence of values, or if the sequence is empty or contains only values. + + or is . + is not a . + + + + Computes the average of a sequence of values that is obtained by invoking a projection function on each element of the input sequence. + + A sequence of values to calculate the average of. + A projection function to apply to each element. + A cancellation token that can be used to cancel the work. + The type of the elements of . + + The average of the sequence of values. + + or is . + is not a . + contains no elements. + + + + Computes the average of a sequence of nullable values that is obtained by invoking a projection function on each element of the input sequence. + + A sequence of values to calculate the average of. + A projection function to apply to each element. + A cancellation token that can be used to cancel the work. + The type of the elements of . + + The average of the sequence of values, or if the sequence is empty or contains only values. + + or is . + is not a . + + + + Computes the average of a sequence of values that is obtained by invoking a projection function on each element of the input sequence. + + A sequence of values to calculate the average of. + A projection function to apply to each element. + A cancellation token that can be used to cancel the work. + The type of the elements of . + + The average of the sequence of values. + + or is . + is not a . + contains no elements. + + + + Computes the average of a sequence of nullable values that is obtained by invoking a projection function on each element of the input sequence. + + A sequence of values to calculate the average of. + A projection function to apply to each element. + A cancellation token that can be used to cancel the work. + The type of the elements of . + + The average of the sequence of values, or if the sequence is empty or contains only values. + + or is . + is not a . + + + + Computes the average of a sequence of values that is obtained by invoking a projection function on each element of the input sequence. + + A sequence of values to calculate the average of. + A projection function to apply to each element. + A cancellation token that can be used to cancel the work. + The type of the elements of . + + The average of the sequence of values. + + or is . + is not a . + contains no elements. + + + + Computes the average of a sequence of nullable values that is obtained by invoking a projection function on each element of the input sequence. + + A sequence of values to calculate the average of. + A projection function to apply to each element. + A cancellation token that can be used to cancel the work. + The type of the elements of . + + The average of the sequence of values, or if the sequence is empty or contains only values. + + or is . + is not a . + + + + Computes the average of a sequence of values that is obtained by invoking a projection function on each element of the input sequence. + + A sequence of values to calculate the average of. + A projection function to apply to each element. + A cancellation token that can be used to cancel the work. + The type of the elements of . + + The average of the sequence of values. + + or is . + is not a . + contains no elements. + + + + Computes the average of a sequence of nullable values that is obtained by invoking a projection function on each element of the input sequence. + + A sequence of values to calculate the average of. + A projection function to apply to each element. + A cancellation token that can be used to cancel the work. + The type of the elements of . + + The average of the sequence of values, or if the sequence is empty or contains only values. + + or is . + is not a . + + + + Returns the minimum value of a generic . + + A sequence of values to determine the minimum of. + A cancellation token that can be used to cancel the work. + The type of the elements of . + + The minimum value in the sequence. + + is . + is not a . + + + + Invokes a projection function on each element of a generic and returns the minimum resulting value. + + A sequence of values to determine the minimum of. + A projection function to apply to each element. + A cancellation token that can be used to cancel the work. + The type of the elements of . + The type of the value returned by the function represented by . + + The minimum value in the sequence. + + or is . + is not a . + + + + Returns the maximum value in a generic . + + A sequence of values to determine the maximum of. + A cancellation token that can be used to cancel the work. + The type of the elements of . + + The maximum value in the sequence. + + is . + is not a . + + + + Invokes a projection function on each element of a generic and returns the maximum resulting value. + + A sequence of values to determine the maximum of. + A projection function to apply to each element. + A cancellation token that can be used to cancel the work. + The type of the elements of . + The type of the value returned by the function represented by . + + The maximum value in the sequence. + + or is . + + + Returns the number of elements in a sequence. + The that contains the elements to be counted. + A cancellation token that can be used to cancel the work. + The type of the elements of . + The number of elements in the input sequence. + is . + is not a . + The number of elements in is larger than . + + + Returns the number of elements in the specified sequence that satisfies a condition. + An that contains the elements to be counted. + A function to test each element for a condition. + A cancellation token that can be used to cancel the work. + The type of the elements of . + The number of elements in the sequence that satisfies the condition in the predicate function. + or is . + is not a . + The number of elements in is larger than . + + + Returns the first element of a sequence. + The to return the first element of. + A cancellation token that can be used to cancel the work. + The type of the elements of . + The first element in . + is . + is not a . + The source sequence is empty. + + + Returns the first element of a sequence that satisfies a specified condition. + An to return an element from. + A function to test each element for a condition. + A cancellation token that can be used to cancel the work. + The type of the elements of . + The first element in that passes the test in . + or is . + is not a . + No element satisfies the condition in .-or-The source sequence is empty. + + + Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence. + The to return the first element of. + A cancellation token that can be used to cancel the work. + The type of the elements of . + The single element in . + is . + is not a . + The source sequence is empty. + + + Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence. + An to return an element from. + A function to test each element for a condition. + A cancellation token that can be used to cancel the work. + The single element in that passes the test in . + The type of the elements of . + or is . + is not a . + No element satisfies the condition in .-or-The source sequence is empty. + + + Returns the only element of a sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence. + The to return the single element of. + A cancellation token that can be used to cancel the work. + The type of the elements of . + default() if is empty; otherwise, the single element in . + is . + is not a . + + + Returns the only element of a sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence. + An to return an element from. + A function to test each element for a condition. + A cancellation token that can be used to cancel the work. + The type of the elements of . + default() if is empty or if no element passes the test specified by ; otherwise, the single element in that passes the test specified by . + or is . + is not a . + + + Returns the first element of a sequence, or a default value if the sequence contains no elements. + The to return the first element of. + A cancellation token that can be used to cancel the work. + The type of the elements of . + default() if is empty; otherwise, the first element in . + is . + is not a . + + + Returns the first element of a sequence that satisfies a specified condition or a default value if no such element is found. + An to return an element from. + A function to test each element for a condition. + A cancellation token that can be used to cancel the work. + The type of the elements of . + default() if is empty or if no element passes the test specified by ; otherwise, the first element in that passes the test specified by . + or is . + is not a . + + + + Executes the query and returns its result as a . + + An to return a list from. + A cancellation token that can be used to cancel the work. + The type of the elements of . + A containing the result of the query. + is . + is not a . + + + + Wraps the query in a deferred which enumeration will trigger a batch of all pending future queries. + + An to convert to a future query. + The type of the elements of . + A . + is . + is not a . + + + + Wraps the query in a deferred which will trigger a batch of all pending future queries + when its is read. + + An to convert to a future query. + The type of the elements of . + A . + is . + is not a . + + + + Wraps the query in a deferred which will trigger a batch of all pending future queries + when its is read. + + An to convert to a future query. + An aggregation function to apply to . + The type of the elements of . + The type of the value returned by the function represented by . + A . + is . + is not a . + + + + Allows to set NHibernate query options. + + The type of the queried elements. + The query on which to set options. + The options setter. + The query altered with the options. + + + + Allows to set NHibernate query options. + + The type of the queried elements. + The query on which to set options. + The options setter. + The query altered with the options. + + + + Allows to specify the parameter NHibernate type to use for a literal in a queryable expression. + + The type of the literal. + The literal value. + The NHibernate type, usually obtained from NHibernateUtil properties. + The literal value. + + + + If debug logging is enabled, log a string such as "msg: expression.ToString()". + + + + + Replace all occurrences of ConstantExpression where the value is an NHibernate + proxy with a ParameterExpression. The name of the parameter will be a string + representing the proxied entity, without initializing it. + + + + + Entity type to insert or update when the expression is a DML. + + + + + Entity type to insert or update when the expression is a DML. + + + + + Interface to access the entity name of a NhQueryable instance. + + + + + Provides the main entry point to a LINQ query. + + + + + Expose NH queryable options. + + + + + + + + + + + + + + + + + Enable caching of this query result set. + + Should the query results be cacheable? + (for method chaining). + + + + Override the current session cache mode, just for this query. + + The cache mode to use. + (for method chaining). + + + + Set the name of the cache region. + + The name of a query cache region, or + for the default query cache + (for method chaining). + + + + Set the timeout for the underlying ADO query. + + The timeout in seconds. + (for method chaining). + + + + Set the read-only mode for entities (and proxies) loaded by this query. This setting + overrides the default setting for the session (see ). + + + + Read-only entities can be modified, but changes are not persisted. They are not + dirty-checked and snapshots of persistent state are not maintained. + + + When a proxy is initialized, the loaded entity will have the same read-only setting + as the uninitialized proxy, regardless of the session's current setting. + + + The read-only setting has no impact on entities or proxies returned by the criteria + that existed in the session before the criteria was executed. + + + + If true, entities (and proxies) loaded by the query will be read-only. + + this (for method chaining) + + + + Set a comment that will be prepended before the generated SQL. + + The comment to prepend. + (for method chaining). + + + + Applies the minimal transformations required before parameterization, + expression key computing and parsing. + + The expression to transform. + The transformed expression. + + + + Builds a new query provider. + + A session. + If the query is to be filtered as belonging to an entity collection, the collection. + The new query provider instance. + + + + Associate unique names to query sources. The HQL AST parser will rename them anyway, but we need to + ensure uniqueness that is not provided by IQuerySource.ItemName. + + + + + Expands conditional and coalesce expressions that are merging QueryReferences so that they can be followed by + Member or Method calls. + Ex) query.Where(x => (x.OptionA ?? x.OptionB).Value == value); + query.Where(x => (x.UseA ? x.OptionA : x.OptionB).Value = value); + + + + + Removes various result operators from a query so that they can be processed at the same + tree level as the query itself. + + + + + Rewrites expressions so that they sit in the outermost portion of the query. + + + + + Gets an of that were rewritten. + + + + + Gets the representing the type of data that the operator works upon. + + + + + Result of . + + + + + Gets an of implementations that were + rewritten. + + + + + Gets the representing the type of data that the operator works upon. + + + + + Expands conditionals within subquery FROM clauses. + It does this by moving the conditional expression outside of the subquery and cloning the subquery, + replacing the FROM clause with the collection parts of the conditional. + + + + + Use this method in a Linq2NHibernate expression to generate + an SQL LIKE expression. (If you want to avoid depending on the NHibernate.Linq namespace, + you can define your own replica of this method. Any 2-argument method named Like in a class named SqlMethods + will be translated.) This method can only be used in Linq2NHibernate expressions, and will throw + if called directly. + + + + + Use this method in a Linq2NHibernate expression to generate + an SQL LIKE expression with an escape character defined. (If you want to avoid depending on the NHibernate.Linq namespace, + you can define your own replica of this method. Any 3-argument method named Like in a class named SqlMethods + will be translated.) This method can only be used in Linq2NHibernate expressions, and will throw + if called directly. + + + + + "Batch" loads collections, using multiple foreign key values in the SQL Where clause + + + + + + + Superclass for loaders that initialize collections + + + + + + + An interface for collection loaders + + + + + + + Initialize the given collection + + + + + Initialize the given collection + + + + Implements subselect fetching for a collection + + + + Implements subselect fetching for a one to many association + + + + + Walker for collections of values and many-to-many associations + + + + + Loads a collection of values or a many-to-many association. + + + The collection persister must implement . For + other collections, create a customized subclass of + + + + + + Superclass of walkers for collection initializers + + + + + + + + Walker for one-to-many associations + + + + + + Loads one-to-many associations + + + The collection persister must implement . + For other collections, create a customized subclass of . + + + + + + A Loader for queries. + + + Note that criteria + queries are more like multi-object Load()s than like HQL queries. + + + + + A for queries. + + + + + + Use the discriminator, to narrow the select to instances + of the queried subclass, also applying any filters. + + + + + + + + Returns the child criteria aliases for a parent SQL alias and a child path. + + + + + Get the names of the columns constrained by this criterion. + + + + + Get the a typed value for the given property value. + + + + + Get the aliases of the columns constrained + by this criterion (for use in ORDER BY clause). + + + + + Extension point for loaders which use a SQL result set with "unexpected" column aliases. + + + + Build a logical result row. + + Entity data defined as "root returns" and already handled by the normal Loader mechanism. + + The ADO result set (positioned at the row currently being processed). + Does this query have an associated . + The session from which the query request originated. + A cancellation token that can be used to cancel the work + The logical result row + + At this point, Loader has already processed all non-scalar result data. We + just need to account for scalar result data here... + + + + Build a logical result row. + + Entity data defined as "root returns" and already handled by the normal Loader mechanism. + + The ADO result set (positioned at the row currently being processed). + Does this query have an associated . + The session from which the query request originated. + The logical result row + + At this point, Loader has already processed all non-scalar result data. We + just need to account for scalar result data here... + + + + + Encapsulates the metadata available from the database result set. + + + + + Initializes a new instance of the class. + + The result set. + + + + Gets the column count in the result set. + + The column count. + + + + Gets the (zero-based) position of the column with the specified name. + + Name of the column. + The column position. + + + + Gets the name of the column at the specified position. + + The (zero-based) position. + The column name. + + + + Gets the Hibernate type of the specified column. + + The column position. + The Hibernate type. + + + Specifically a fetch return that refers to a collection association. + + + + Represents a return which names a collection role; it + is used in defining a custom query for loading an entity's + collection in non-fetching scenarios (i.e., loading the collection + itself as the "root" of the result). + + + + Returns the class owning the collection. + + + Returns the name of the property representing the collection from the . + + + + that uses columnnames instead of generated aliases. + Aliases can still be overwritten via <return-property> + + + + + Returns the suffixed result-set column-aliases for columns making up the key for this collection (i.e., its FK to + its owner). + + The key result-set column aliases. + + + + Returns the suffixed result-set column-aliases for the columns making up the collection's index (map or list). + + The index result-set column aliases. + + + + Returns the suffixed result-set column-aliases for the columns making up the collection's elements. + + The element result-set column aliases. + + + + Returns the suffixed result-set column-aliases for the column defining the collection's identifier (if any). + + The identifier result-set column aliases. + + + + Returns the suffix used to unique the column aliases for this particular alias set. + + The uniqued column alias suffix. + + + + that chooses the column names over the alias names. + + + + Specifically a fetch return that refers to an entity association. + + + Represents a return which names a fetched association. + + + Retrieves the return descriptor for the owner of this fetch. + + + The name of the property on the owner which represents this association. + + + + Extension point allowing any SQL query with named and positional parameters + to be executed by Hibernate, returning managed entities, collections and + simple scalar values. + + + + The SQL query string to be performed. + + + + Any query spaces to apply to the query execution. Query spaces are + used in Hibernate's auto-flushing mechanism to determine which + entities need to be checked for pending changes. + + + + + A collection of descriptors describing the + ADO result set to be expected and how to map this result set. + + + + Represents a return in a custom query. + + + Represents some non-scalar (entity/collection) return within the query result. + + + + Represents a return which names a "root" entity. + + + A root entity means it is explicitly a "column" in the result, as opposed to + a fetched association. + + + + Represent a scalar (AKA simple value) return within a query result. + + + Implements Hibernate's built-in support for native SQL queries. + This support is built on top of the notion of "custom queries"... + + + + Substitutes ADO parameter placeholders (?) for all encountered + parameter specifications. It also tracks the positions of these + parameter specifications within the query string. This accounts for + ordinal-params, named-params, and ejb3-positional-params. + + The query string. + The SQL query with parameter substitution complete. + + + + Abstract superclass for entity loaders that use outer joins + + + + + "Batch" loads entities, using multiple primary key values in the + SQL where clause. + + + + + + Load an entity using outerjoin fetching to fetch associated entities. + + + The must implement . For other entities, + create a customized subclass of . + + + + + Loads entities for a + + + + + Load an entity instance. If OptionalObject is supplied, load the entity + state into the given (uninitialized) object + + + + + Load an entity instance. If OptionalObject is supplied, load the entity + state into the given (uninitialized) object + + + + + A walker for loaders that fetch entities + + + + + + Override to use the persister to change the table-alias for columns in join-tables + + + + + Disable outer join fetching if this loader obtains an + upgrade lock mode + + + + + + + a collection of lock modes specified dynamically via the Query interface + + + + + Abstract superclass of object loading (and querying) strategies. + + + + This class implements useful common functionality that concrete loaders would delegate to. + It is not intended that this functionality would be directly accessed by client code (Hence, + all methods of this class are declared protected or private.) This class relies heavily upon the + interface, which is the contract between this class and + s that may be loaded by it. + + + The present implementation is able to load any number of columns of entities and at most + one collection role per query. + + + All this class members are thread safe. Entity and collection loaders are held in persisters shared among + sessions built from the same session factory. They must be thread safe. + + + + + + + Execute an SQL query and attempt to instantiate instances of the class mapped by the given + persister from each row of the DataReader. If an object is supplied, will attempt to + initialize that object. If a collection is supplied, attempt to initialize that collection. + + + + + Loads a single row from the result set. This is the processing used from the + ScrollableResults where no collection fetches were encountered. + + The result set from which to do the load. + The session from which the request originated. + The query parameters specified by the user. + Should proxies be generated + A cancellation token that can be used to cancel the work + The loaded "row". + + + + + Read any collection elements contained in a single row of the result set + + + + + Get the actual object that is returned in the user-visible result list. + + + This empty implementation merely returns its first argument. This is + overridden by some subclasses. + + + + + Read one collection element from the current row of the ADO.NET result set + + + + + Read a row of EntityKeys from the DbDataReader into the given array. + + + Warning: this method is side-effecty. If an id is given, don't bother going + to the DbDataReader + + + + + Check the version of the object in the DbDataReader against + the object version in the session cache, throwing an exception + if the version numbers are different. + + + + + + Resolve any ids for currently loaded objects, duplications within the DbDataReader, + etc. Instantiate empty objects to be initialized from the DbDataReader. Return an + array of objects (a row of results) and an array of booleans (by side-effect) that determine + whether the corresponding object should be initialized + + + + + The entity instance is already in the session cache + + + + + The entity instance is not in the session cache + + + + + Hydrate the state of an object from the SQL DbDataReader, into + an array of "hydrated" values (do not resolve associations yet), + and pass the hydrated state to the session. + + + + + Determine the concrete class of an instance for the DbDataReader + + + + + Advance the cursor to the first required row of the DbDataReader + + + + + Obtain an DbCommand with all parameters pre-bound. Bind positional parameters, + named parameters, and limit parameters. + + + Creates an DbCommand object and populates it with the values necessary to execute it against the + database to Load an Entity. + + The to use for the DbCommand. + TODO: find out where this is used... + The SessionImpl this Command is being prepared in. + A cancellation token that can be used to cancel the work + A CommandWrapper wrapping an DbCommand that is ready to be executed. + + + + Fetch a DbCommand, call SetMaxRows and then execute it, + advance to the first result and return an SQL DbDataReader + + The to execute. + The to apply to the and . + true if result types need to be auto-discovered by the loader; false otherwise. + The to load in. + + A cancellation token that can be used to cancel the work + An DbDataReader advanced to the first record in RowSelection. + + + + Fetch a DbCommand, call SetMaxRows and then execute it, + advance to the first result and return an SQL DbDataReader + + The to execute. + The . + The to load in. + The forced result transformer for the query. + A cancellation token that can be used to cancel the work + A DbDataReader advanced to the first record in RowSelection. + + + + Called by subclasses that load entities + + + + + Called by subclasses that batch load entities + + + + + Called by subclasses that load collections + + + + + Called by wrappers that batch initialize collections + + + + + Called by subclasses that batch initialize collections + + + + + Return the query results, using the query cache, called + by subclasses that implement cacheable queries + + + + + + A cancellation token that can be used to cancel the work + + + + + Return the query results, using the query cache, called + by subclasses that implement cacheable queries + + + + + A cancellation token that can be used to cancel the work + + + + + Actually execute a query, ignoring the query cache + + + + A cancellation token that can be used to cancel the work + + + + + Indicates whether the dialect is able to add limit and/or offset clauses to . + Even if a dialect generally supports the addition of limit and/or offset clauses to SQL statements, + there may (custom) SQL statements where this is not possible, for example in case of SQL Server + stored procedure invocations. + + + + + Caches subclass entity aliases for given persister index in and subclass entity name + + + + + An array indicating whether the entities have eager property fetching + enabled. + + Eager property fetching indicators. + + + + An array of indexes of the entity that owns a one-to-one association + to the entity at the given index (-1 if there is no "owner") + + + The indexes contained here are relative to the result of . + + + + + An array of the owner types corresponding to the + returns. Indices indicating no owner would be null here. + + + + + Get the index of the entity that owns the collection, or -1 + if there is no owner in the query results (i.e. in the case of a + collection initializer) or no collection. + + + + + Return false is this loader is a batch entity loader + + + + + Get the result set descriptor + + + + + The result types of the result set, for query loaders. + + + + + The SqlString to be called; implemented by all subclasses + + + + + An array of persisters of entity classes contained in each row of results; + implemented by all subclasses + + + The setter was added so that classes inheriting from Loader could write a + value using the Property instead of directly to the field. + + + + + An (optional) persister for a collection to be initialized; only collection loaders + return a non-null value + + + + + What lock mode does this load entities with? + + A Collection of lock modes specified dynamically via the Query Interface + + + + + Append FOR UPDATE OF clause, if necessary. This + empty superclass implementation merely returns its first + argument. + + + + + Does this query return objects that might be already cached by + the session, whose lock mode may need upgrading. + + + + + + Get the SQL table aliases of entities whose + associations are subselect-loadable, returning + null if this loader does not support subselect + loading + + + + + Modify the SQL, adding lock hints and comments, if necessary + + + + + Execute an SQL query and attempt to instantiate instances of the class mapped by the given + persister from each row of the DataReader. If an object is supplied, will attempt to + initialize that object. If a collection is supplied, attempt to initialize that collection. + + + + + Loads a single row from the result set. This is the processing used from the + ScrollableResults where no collection fetches were encountered. + + The result set from which to do the load. + The session from which the request originated. + The query parameters specified by the user. + Should proxies be generated + The loaded "row". + + + + + Read any collection elements contained in a single row of the result set + + + + + Determine the actual ResultTransformer that will be used to transform query results. + + The specified result transformer. + The actual result transformer. + + + + Are rows transformed immediately after being read from the ResultSet? + + True, if getResultColumnOrRow() transforms the results; false, otherwise + + + + Returns the aliases that correspond to a result row. + + Returns the aliases that correspond to a result row. + + + + Get the actual object that is returned in the user-visible result list. + + + This empty implementation merely returns its first argument. This is + overridden by some subclasses. + + + + + For missing objects associated by one-to-one with another object in the + result set, register the fact that the the object is missing with the + session. + + + + + Read one collection element from the current row of the ADO.NET result set + + + + + If this is a collection initializer, we need to tell the session that a collection + is being initialized, to account for the possibility of the collection having + no elements (hence no rows in the result set). + + + + + Read a row of EntityKeys from the DbDataReader into the given array. + + + Warning: this method is side-effecty. If an id is given, don't bother going + to the DbDataReader + + + + + Check the version of the object in the DbDataReader against + the object version in the session cache, throwing an exception + if the version numbers are different. + + + + + + Resolve any ids for currently loaded objects, duplications within the DbDataReader, + etc. Instantiate empty objects to be initialized from the DbDataReader. Return an + array of objects (a row of results) and an array of booleans (by side-effect) that determine + whether the corresponding object should be initialized + + + + + The entity instance is already in the session cache + + + + + The entity instance is not in the session cache + + + + + Hydrate the state of an object from the SQL DbDataReader, into + an array of "hydrated" values (do not resolve associations yet), + and pass the hydrated state to the session. + + + + + Determine the concrete class of an instance for the DbDataReader + + + + + Advance the cursor to the first required row of the DbDataReader + + + + + Should we pre-process the SQL string, adding a dialect-specific + LIMIT clause. + + + + + + + + Performs dialect-specific manipulations on the offset value before returning it. + This method is applicable for use in limit statements only. + + + + + Performs dialect-specific manipulations on the limit value before returning it. + This method is applicable for use in limit statements only. + + + + + Obtain an DbCommand with all parameters pre-bound. Bind positional parameters, + named parameters, and limit parameters. + + + Creates an DbCommand object and populates it with the values necessary to execute it against the + database to Load an Entity. + + The to use for the DbCommand. + TODO: find out where this is used... + The SessionImpl this Command is being prepared in. + A CommandWrapper wrapping an DbCommand that is ready to be executed. + + + + Some dialect-specific LIMIT clauses require the maximum last row number + (aka, first_row_number + total_row_count), while others require the maximum + returned row count (the total maximum number of rows to return). + + The selection criteria + The dialect + The appropriate value to bind into the limit clause. + + + + Fetch a DbCommand, call SetMaxRows and then execute it, + advance to the first result and return an SQL DbDataReader + + The to execute. + The to apply to the and . + true if result types need to be auto-discovered by the loader; false otherwise. + The to load in. + + An DbDataReader advanced to the first record in RowSelection. + + + + Fetch a DbCommand, call SetMaxRows and then execute it, + advance to the first result and return an SQL DbDataReader + + The to execute. + The . + The to load in. + The forced result transformer for the query. + A DbDataReader advanced to the first record in RowSelection. + + + + Called by subclasses that load entities + + + + + Called by subclasses that batch load entities + + + + + Called by subclasses that load collections + + + + + Called by wrappers that batch initialize collections + + + + + Called by subclasses that batch initialize collections + + + + + Return the query results, using the query cache, called + by subclasses that implement cacheable queries + + + + + + + + + + Return the query results, using the query cache, called + by subclasses that implement cacheable queries + + + + + + + + + Actually execute a query, ignoring the query cache + + + + + + + + Calculate and cache select-clause suffixes. Must be + called by subclasses after instantiation. + + + + + Identifies the query for statistics reporting, if null, + no statistics will be reported + + + + + The superclass deliberately excludes collections + + + + + Don't bother with the discriminator, unless overridden by subclass + + + + + Utility method that generates 0_, 1_ suffixes. Subclasses don't + necessarily need to use this algorithm, but it is intended that + they will in most cases. + + + + + EntityAliases which handles the logic of selecting user provided aliases (via return-property), + before using the default aliases. + + + + + Calculate and cache select-clause aliases. + + + + + Returns aliases for subclass persister + + + + + Returns default aliases for all the properties + + + + + CollectionAliases which handles the logic of selecting user provided aliases (via return-property), + before using the default aliases. + + + + + Returns the suffixed result-set column-aliases for columns making up the key for this collection (i.e., its FK to + its owner). + + + + + Returns the suffixed result-set column-aliases for the columns making up the collection's index (map or list). + + + + + Returns the suffixed result-set column-aliases for the columns making up the collection's elements. + + + + + Returns the suffixed result-set column-aliases for the column defining the collection's identifier (if any). + + + + + Returns the suffix used to unique the column aliases for this particular alias set. + + + + + Type definition of CollectionAliases. + + + + + Returns the suffixed result-set column-aliases for columns making + up the key for this collection (i.e., its FK to its owner). + + The key result-set column aliases. + + + + Returns the suffixed result-set column-aliases for the columns + making up the collection's index (map or list). + + The index result-set column aliases. + + + + Returns the suffixed result-set column-aliases for the columns + making up the collection's elements. + + The element result-set column aliases. + + + + Returns the suffixed result-set column-aliases for the column + defining the collection's identifier (if any). + + The identifier result-set column aliases. + + + + Returns the suffix used to unique the column aliases for this + particular alias set. + + The uniqued column alias suffix. + + + + Metadata describing the SQL result set column aliases + for a particular entity + + + + + The result set column aliases for the primary key columns + + + + + The result set column aliases for the discriminator columns + + + + + The result set column aliases for the version columns + + + + + The result set column alias for the Oracle row id + + + + + The result set column aliases for the property columns + + + + + The result set column aliases for the property columns of a subclass + + + + + Add on association (one-to-one, many-to-one, or a collection) to a list + of associations to be fetched by outerjoin (if necessary) + + + + + Add on association (one-to-one, many-to-one, or a collection) to a list + of associations to be fetched by outerjoin + + + + + Adds an association and extracts the aliases the association's 'with clause' is dependent on + + + + + For an entity class, return a list of associations to be fetched by outerjoin + + + + + For a collection role, return a list of associations to be fetched by outerjoin + + + + + For a collection role, return a list of associations to be fetched by outerjoin + + + + + For an entity class, add to a list of associations to be fetched + by outerjoin + + + + + For a component, add to a list of associations to be fetched by outerjoin + + + + + For a composite element, add to a list of associations to be fetched by outerjoin + + + + + Extend the path by the given property name + + + + + Get the join type (inner, outer, etc) or -1 if the + association should not be joined. Override on + subclasses. + + + + + Get the join type (inner, outer, etc) or -1 if the + association should not be joined. Override on + subclasses. + + + + + Returns the child criteria aliases for a parent SQL alias and a child path. + + + + + Use an inner join if it is a non-null association and this + is the "first" join in a series + + + + + Does the mapping, and Hibernate default semantics, specify that + this association should be fetched by outer joining + + + + + Override on subclasses to enable or suppress joining + of certain association types + + + + + Used to detect circularities in the joined graph, note that + this method is side-effecty + + + + + Used to detect circularities in the joined graph, note that + this method is side-effecty + + + + + Uniquely identifier a foreign key, so that we don't + join it more than once, and create circularities + + + + + Should we join this association? + + + + + Generate a sequence of LEFT OUTER JOIN clauses for the given associations. + + + + + Count the number of instances of IJoinable which are actually + also instances of ILoadable, or are one-to-many associations + + + + + Count the number of instances of which + are actually also instances of + which are being fetched by outer join + + + + + Get the order by string required for collection fetching + + + + + Render the where condition for a (batch) load by identifier / collection key + + + + + Generate a select list of columns containing all properties of the entity classes + + + + + Get the position of the join with the given alias in the + list of joins + + + + + Implements logic for walking a tree of associated classes. + + + Generates an SQL select string containing all properties of those classes. + Tables are joined using an ANSI-style left outer join. + + + + + Universal query batcher + + + + + Executes the batch. + + A cancellation token that can be used to cancel the work + + + + Gets a query result, triggering execution of the batch if it was not already executed. + + The index of the query for which results are to be obtained. + A cancellation token that can be used to cancel the work + The type of the result elements of the query. + A query result. + is 0 based and matches the order in which queries have been + added into the batch. + + + + Gets a query result, triggering execution of the batch if it was not already executed. + + The key of the query for which results are to be obtained. + A cancellation token that can be used to cancel the work + The type of the result elements of the query. + A query result. + + + + Executes the batch. + + + + + Returns true if batch is already executed or empty + + + + + Adds a query to the batch. + + The query. + Thrown if the batch has already been executed. + Thrown if is . + + + + Adds a query to the batch. + + A key for retrieval of the query result. + The query. + Thrown if the batch has already been executed. + Thrown if is . + + + + Gets a query result, triggering execution of the batch if it was not already executed. + + The index of the query for which results are to be obtained. + The type of the result elements of the query. + A query result. + is 0 based and matches the order in which queries have been + added into the batch. + + + + Gets a query result, triggering execution of the batch if it was not already executed. + + The key of the query for which results are to be obtained. + The type of the result elements of the query. + A query result. + + + + The timeout in seconds for the underlying ADO.NET query. + + + + + The session flush mode to use during the batch execution. + + + + + Interface for wrapping query to be batched by . + + + + + Process the result sets generated by . Advance the results set + to the next query, or to its end if this is the last query. + + The number of rows processed. + + + + Execute immediately the query as a single standalone query. Used in case the data-provider + does not support batches. + + A cancellation token that can be used to cancel the work + + + + Optionally, the query caching information list, for batching. Each element matches + a SQL-Query resulting from the query translation, in the order they are translated. + It should yield an empty enumerable if no batching of caching is handled for this + query. + + + + + Initialize the query. Method is called right before batch execution. + Can be used for various delayed initialization logic. + + + + + + Get the query spaces. + + + Query spaces indicates which entity classes are used by the query and need to be flushed + when auto-flush is enabled. It also indicates which cache update timestamps needs to be + checked for up-to-date-ness. + + + + + Get the commands to execute for getting the not-already cached results of this query. + + The commands for obtaining the results not already cached. + + + + Process the result sets generated by . Advance the results set + to the next query, or to its end if this is the last query. + + The number of rows processed. + + + + Process the results of the query, including cached results. + + Any result from the database must have been previously processed + through . + + + + Execute immediately the query as a single standalone query. Used in case the data-provider + does not support batches. + + + + + Create instance via methods + + Result type + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Adds a query to the batch. + + The batch. + The query. + Callback to execute when query is loaded. Loaded results are provided as action parameter. + The type of the query result elements. + Thrown if the batch has already been executed. + Thrown if is . + The batch instance for method chain. + + + + Adds a query to the batch. + + The batch. + A key for retrieval of the query result. + The query. + The type of the query result elements. + Thrown if the batch has already been executed. + Thrown if is . + The batch instance for method chain. + + + + Adds a query to the batch. + + The batch. + The query. + Callback to execute when query is loaded. Loaded results are provided as action parameter. + The type of the query result elements. + Thrown if the batch has already been executed. + Thrown if is . + The batch instance for method chain. + + + + Adds a query to the batch. + + The batch. + A key for retrieval of the query result. + The query. + The type of the query result elements. + Thrown if the batch has already been executed. + Thrown if is . + The batch instance for method chain. + + + + Adds a query to the batch. + + The batch. + The query. + Callback to execute when query is loaded. Loaded results are provided as action parameter. + The type of the query result elements. + Thrown if the batch has already been executed. + Thrown if is . + The batch instance for method chain. + + + + Adds a query to the batch. + + The batch. + A key for retrieval of the query result. + The query. + The type of the query result elements. + Thrown if the batch has already been executed. + Thrown if is . + The batch instance for method chain. + + + + Adds a query to the batch. + + The batch. + The query. + Callback to execute when query is loaded. Loaded results are provided as action parameter. + The type of the query result elements. + Thrown if the batch has already been executed. + Thrown if is . + The batch instance for method chain. + + + + Adds a query to the batch. + + The batch. + A key for retrieval of the query result. + The query. + The type of the query result elements. + Thrown if the batch has already been executed. + Thrown if is . + The batch instance for method chain. + + + + Adds a query to the batch. + + The batch. + The query. + Callback to execute when query is loaded. Loaded results are provided as action parameter. + The type of the query result elements. + Thrown if the batch has already been executed. + Thrown if is . + The batch instance for method chain. + + + + Adds a query to the batch. + + The batch. + A key for retrieval of the query result. + The query. + The type of the query result elements. + Thrown if the batch has already been executed. + Thrown if is . + The batch instance for method chain. + + + + Adds a query to the batch. + + The batch. + The query. + Callback to execute when query is loaded. Loaded results are provided as action parameter. + The type of the query result elements. + Thrown if the batch has already been executed. + Thrown if is . + The batch instance for method chain. + + + + Adds a query to the batch. + + The batch. + A key for retrieval of the query result. + The query. + The type of the query result elements. + Thrown if the batch has already been executed. + Thrown if is . + The batch instance for method chain. + + + + Adds a query to the batch. + + The batch. + The query. + An aggregation function to apply to . + Callback to execute when query is loaded. Loaded results are provided as action parameter. + The type of the query elements before aggregation. + The type resulting of the query result aggregation. + Thrown if the batch has already been executed. + Thrown if is . + The batch instance for method chain. + + + + Adds a query to the batch. + + The batch. + A key for retrieval of the query result. + The query. + An aggregation function to apply to . + The type of the query elements before aggregation. + The type resulting of the query result aggregation. + Thrown if the batch has already been executed. + Thrown if is . + The batch instance for method chain. + + + + Sets the timeout in seconds for the underlying ADO.NET query. + + The batch. + The timeout for the batch. + The batch instance for method chain. + + + + Overrides the current session flush mode, just for this query batch. + + The batch. + The flush mode for the batch. + The batch instance for method chain. + + + + Adds a query to the batch, returning it as an . + + The batch. + The query. + The type of the query result elements. + A future query which execution will be handled by the batch. + + + + Adds a query to the batch, returning it as an . + + The batch. + The query. + The type of the query result elements. + A future query which execution will be handled by the batch. + + + + Adds a query to the batch, returning it as an . + + The batch. + The query. + The type of the query result elements. + A future query which execution will be handled by the batch. + + + + Adds a query to the batch, returning it as an . + + The batch. + The query. + The type of the query result elements. + A future query which execution will be handled by the batch. + + + + Adds a query to the batch, returning it as an . + + The batch. + The query. + The type of the query result elements. + A future query which execution will be handled by the batch. + + + + Adds a query to the batch, returning it as an . + + The batch. + The query. + The type of the query result elements. + A future query which execution will be handled by the batch. + + + + Adds a query to the batch, returning it as an . + + The batch. + The query. + The type of the query result elements. + A future query which execution will be handled by the batch. + + + + Adds a query to the batch, returning it as an . + + The batch. + The query. + An aggregation function to apply to . + The type of the query elements before aggregation. + The type resulting of the query result aggregation. + A future query which execution will be handled by the batch. + + + + Adds a query to the batch, returning it as an . + + The batch. + The query. + The type of the query result elements. + A future query which execution will be handled by the batch. + + + + Adds a query to the batch, returning it as an . + + The batch. + The query. + The type of the query result elements. + A future query which execution will be handled by the batch. + + + + Adds a query to the batch, returning it as an . + + The batch. + The query. + The type of the query result elements. + A future query which execution will be handled by the batch. + + + + Adds a query to the batch, returning it as an . + + The batch. + The query. + The type of the query result elements. + A future query which execution will be handled by the batch. + + + + Adds a query to the batch, returning it as an . + + The batch. + The query. + The type of the query result elements. + A future query which execution will be handled by the batch. + + + + Adds a query to the batch, returning it as an . + + The batch. + The query. + The type of the query result elements. + A future query which execution will be handled by the batch. + + + + Adds a query to the batch, returning it as an . + + The batch. + The query. + The type of the query result elements. + A future query which execution will be handled by the batch. + + + + Base class for both ICriteria and IQuery queries + + + + + + + + + + + The query loader. + + + + + The query result. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Indicates if the query result was obtained from the cache. + + + + + Should a result retrieved from database be cached? + + + + + The cache batcher to use for entities and collections puts. + + + + + Create a new QueryInfo. + + The query parameters. + The loader. + The query spaces. + The session of the query. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Querying information. + + + + + Is the query cacheable? + + + + + The query cache key. + + + + + The query parameters. + + + + + The query spaces. + + + Query spaces indicates which entity classes are used by the query and need to be flushed + when auto-flush is enabled. It also indicates which cache update timestamps needs to be + checked for up-to-date-ness. + + + + + Can the query be obtained from cache? + + + + + The query result types. + + + + + The query result to put in the cache. if no put should be done. + + + + + The query identifier, for statistics purpose. + + + + + Set the result retrieved from the cache. + + The results. Can be in case of cache miss. + + + + Set the to use for batching entities and collections cache puts. + + A cache batcher. + + + + Interface for wrapping query to be batched by . + + + + + Return loaded typed results by query. + Must be called only after . + + + + + A callback, executed after results are loaded by the batch. + Loaded results are provided as the action parameter. + + + + + Provides access to the full range of NHibernate built-in types. + IType instances may be used to bind values to query parameters. + if needing to specify type size, + precision or scale. + + + + + Force initialization of a proxy or persistent collection. + + a persistable object, proxy, persistent collection or null + A cancellation token that can be used to cancel the work + if we can't initialize the proxy at this time, eg. the Session was closed + + + + Get the true, underlying class of a proxied persistent class. This operation + will initialize a proxy by side-effect. + + a persistable object or proxy + A cancellation token that can be used to cancel the work + the true class of the instance + + + + Guesses the IType of this object + + The obj. + + + + + Guesses the IType by the type + + The type. + + + + + NHibernate Ansi String type + + + + + NHibernate binary type + + + + + NHibernate binary blob type + + + + + NHibernate boolean type + + + + + NHibernate byte type + + + + + NHibernate character type + + + + + NHibernate Culture Info type + + + + + NHibernate date time type. Since v5.0, does no more cut fractional seconds. + + Use if needing cutting milliseconds. + + + + NHibernate date time cutting milliseconds type + + + + + NHibernate date time 2 type + + + + + NHibernate local date time type + + + + + NHibernate utc date time type + + + + + NHibernate local date time cutting milliseconds type + + + + + NHibernate utc date time cutting milliseconds type + + + + + NHibernate date time with offset type + + + + + NHibernate date type + + + + + NHibernate decimal type + + + + + NHibernate double type + + + + + NHibernate Currency type (System.Decimal - DbType.Currency) + + + + + NHibernate Guid type. + + + + + NHibernate System.Int16 (short in C#) type + + + + + NHibernate System.Int32 (int in C#) type + + + + + NHibernate System.Int64 (long in C#) type + + + + + NHibernate System.SByte type + + + + + NHibernate System.UInt16 (ushort in C#) type + + + + + NHibernate System.UInt32 (uint in C#) type + + + + + NHibernate System.UInt64 (ulong in C#) type + + + + + NHibernate System.Single (float in C#) Type + + + + + NHibernate String type + + + + + NHibernate string clob type + + + + + NHibernate Time type + + + + + NHibernate Ticks type + + + + + NHibernate UTC Ticks type + + + + + NHibernate TimeAsTimeSpan type + + + + + NHibernate TimeSpan type + + + + + NHibernate Timestamp type + + + + + NHibernate Timestamp type, seeded db side. + + + + + NHibernate Timestamp type, seeded db side, in UTC. + + + + + NHibernate TrueFalse type + + + + + NHibernate YesNo type + + + + + NHibernate class type + + + + + NHibernate class meta type for association of kind any. + + + + + + NHibernate meta type for association of kind any without meta-values. + + + + + + NHibernate serializable type + + + + + NHibernate System.Object type + + + + + NHibernate AnsiChar type + + + + + NHibernate XmlDoc type + + + + + NHibernate XDoc type + + + + + NHibernate Uri type + + + + + A NHibernate persistent enum type + + + + + + + A NHibernate serializable type + + + + + + + A NHibernate serializable type + + a type mapping to a single column + the entity identifier type + + + + + A NHibernate persistent object (entity) type + + a mapped entity class + + + + A Hibernate persistent object (entity) type. + a mapped entity class + + + + A NHibernate custom type + + a class that implements UserType + + + + + Force initialization of a proxy or persistent collection. + + a persistable object, proxy, persistent collection or null + if we can't initialize the proxy at this time, eg. the Session was closed + + + + Is the proxy or persistent collection initialized? + + a persistable object, proxy, persistent collection or null + true if the argument is already initialized, or is not a proxy or collection + + + + Get the true, underlying class of a proxied persistent class. This operation + will initialize a proxy by side-effect. + + a persistable object or proxy + the true class of the instance + + + + Close an obtained from an + returned by NHibernate immediately, instead of waiting until the session is + closed or disconnected. + + + + + Close an returned by NHibernate immediately, + instead of waiting until the session is closed or disconnected. + + + + + Check if the property is initialized. If the named property does not exist + or is not persistent, this method always returns true. + + The potential proxy + the name of a persistent attribute of the object + + true if the named property of the object is not listed as uninitialized; + false if the object is an uninitialized proxy, or the named property is uninitialized + + + + + Constructs an AbstractExplicitParameterSpecification. + + sourceLine + sourceColumn + + + + Creates a specialized collection-filter collection-key parameter spec. + + The collection role being filtered. + The mapped collection-key type. + The position within QueryParameters where we can find the appropriate param value to bind. + + + + Constructs a parameter specification for a particular filter parameter. + + The name of the filter + The name of the parameter + The parameter type specified on the filter metadata + + + + + Maintains information relating to parameters which need to get bound into a . + + + + + Bind the appropriate value into the given command. + + The command into which the value should be bound. + The list of Sql query parameter in the exact sequence they are present in the query. + The defined values for the current query execution. + The session against which the current execution is occuring. + A cancellation token that can be used to cancel the work + + + + Bind the appropriate value into the given command. + + The command into which the value should be bound. + The parameter-list of the whole query of the command. + The offset from where start the list of in the given for the query where this was used. + The list of Sql query parameter in the exact sequence they are present in the query where this was used. + The defined values for the query where this was used. + The session against which the current execution is occuring. + A cancellation token that can be used to cancel the work + + Suppose the is composed by two queries. The for the first query is zero. + If the first query in has 12 parameters (size of its SqlType array) the offset to bind all s of the second query in the + is 12 (for the first query we are using from 0 to 11). + + + + + Bind the appropriate value into the given command. + + The command into which the value should be bound. + The list of Sql query parameter in the exact sequence they are present in the query. + The defined values for the current query execution. + The session against which the current execution is occuring. + + + + Bind the appropriate value into the given command. + + The command into which the value should be bound. + The parameter-list of the whole query of the command. + The offset from where start the list of in the given for the query where this was used. + The list of Sql query parameter in the exact sequence they are present in the query where this was used. + The defined values for the query where this was used. + The session against which the current execution is occuring. + + Suppose the is composed by two queries. The for the first query is zero. + If the first query in has 12 parameters (size of its SqlType array) the offset to bind all s of the second query in the + is 12 (for the first query we are using from 0 to 11). + + + + + Get or set the type which we are expeting for a bind into this parameter based + on translated contextual information. + + + + + Render this parameter into displayable info (for logging, etc). + + The displayable info + + + + An string array to unique identify this parameter-span inside an . + + The session-factory (used only because required by IType). + + The each id-for-backtrack is supposed to be unique in the context of a query. + + The number of elements returned depend on the column-span of the . + + + + + + Parameter bind specification for an explicit named parameter. + + + + + Constructs a named parameter bind specification. + + sourceLine + sourceColumn + The named parameter name. + + + + The user parameter name. + + + + + Parameter bind specification for an explicit positional (or ordinal) parameter. + + + + + Constructs a position/ordinal parameter bind specification. + + sourceLine + sourceColumn + The position in the source query, relative to the other source positional parameters. + + + + Getter for property 'hqlPosition'. + + + + + Autogenerated parameter for . + + + + + Autogenerated parameter for . + + + + + An additional contract for parameters which originate from parameters explicitly encountered in the source statement + (HQL or native-SQL). + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Retrieves the line number on which this parameter occurs in the source query. + + + + + Retrieves the column number (within the {@link #getSourceLine()}) where this parameter occurs. + + + + + Explicit parameters may have no set the during query parse. + + The defined values for the current query execution. + + This method should be removed when the parameter type is inferred during the parse. + + + + + Additional information for potential paging parameters in HQL/LINQ + + + + + Notifies the parameter that it is a 'skip' parameter, and should calculate its value using the dialect settings + + + + + Notifies the parameter that it is a 'take' parameter, and should calculate its value using the dialect settings + and the value of the supplied skipParameter. + + The associated skip parameter (null if there is none). + + + + Retrieve the skip/offset value for the query + + The parameters for the query + The paging skip/offset value + + + + Summary description for AbstractCollectionPersister. + + + + + Reads the Element from the DbDataReader. The DbDataReader will probably only contain + the id of the Element. + + See ReadElementIdentifier for an explanation of why this method will be depreciated. + + + + Perform an SQL INSERT, and then retrieve a generated identifier. + + the id of the collection entry + + This form is used for PostInsertIdentifierGenerator-style ids (IDENTITY, select, etc). + + + + + Reads the Element from the DbDataReader. The DbDataReader will probably only contain + the id of the Element. + + See ReadElementIdentifier for an explanation of why this method will be depreciated. + + + + Combine arrays indicating settability and nullness of columns into one, considering null columns as not + settable. + + Settable columns. will consider them as all settable. + Nullness of columns. will consider them as all + non-null. indicates a non-null column, indicates a null + column. + The resulting settability of columns, or if both argument are + . + thrown if and + have inconsistent lengthes. + + + + Generate the SQL delete that deletes a particular row. + + A SQL delete. + + + + Generate the SQL delete that deletes a particular row. + + If non-null, an array of boolean indicating which mapped columns of the index + or element would be null. indicates a non-null column, + indicates a null column. + A SQL delete. + + + + Given a query alias and an identifying suffix, render the identifier select fragment for collection element entity. + + + + + + + + Return the element class of an array, or null otherwise + + + + + Get the name of this collection role (the fully qualified class name, + extended by a "property path") + + + + + Get the batch size of a collection persister. + + + + + Perform an SQL INSERT, and then retrieve a generated identifier. + + the id of the collection entry + + This form is used for PostInsertIdentifierGenerator-style ids (IDENTITY, select, etc). + + + + + Collection persister for collections of values and many-to-many associations. + + + + + Generate the SQL DELETE that deletes all rows + + + + + + Generate the SQL INSERT that creates a new row + + + + + + Generate the SQL UPDATE that updates a row + + + + + + + + + Create the + + + + + A strategy for persisting a collection role. + + + Defines a contract between the persistence strategy and the actual persistent collection framework + and session. Does not define operations that are required for querying collections, or loading by outer join. + + Implements persistence of a collection instance while the instance is + referenced in a particular role. + + This class is highly coupled to the + hierarchy, since double dispatch is used to load and update collection + elements. + + May be considered an immutable view of the mapping object + + + + + Initialize the given collection with the given key + + + + A cancellation token that can be used to cancel the work + + + + Read the key from a row of the + + + + + Read the element from a row of the + + + + + Read the index from a row of the + + + + + Read the identifier from a row of the + + + + + Completely remove the persistent state of the collection + + + + A cancellation token that can be used to cancel the work + + + + (Re)create the collection's persistent state + + + + + A cancellation token that can be used to cancel the work + + + + Delete the persistent state of any elements that were removed from the collection + + + + + A cancellation token that can be used to cancel the work + + + + Update the persistent state of any elements that were modified + + + + + A cancellation token that can be used to cancel the work + + + + Insert the persistent state of any new collection elements + + + + + A cancellation token that can be used to cancel the work + + + + Get the cache + + + + Get the cache structure + + + + Get the associated IType + + + + + Get the "key" type (the type of the foreign key) + + + + + Get the "index" type for a list or map (optional operation) + + + + + Get the "element" type + + + + + Return the element class of an array, or null otherwise + + + + + Is this an array or primitive values? + + + + + Is this an array? + + + + Is this a one-to-many association? + + + + Is this a many-to-many association? Note that this is mainly + a convenience feature as the single persister does not + contain all the information needed to handle a many-to-many + itself, as internally it is looked at as two many-to-ones. + + + + + Is this collection lazily initialized? + + + + + Is this collection "inverse", so state changes are not propagated to the database. + + + + + Get the name of this collection role (the fully qualified class name, extended by a "property path") + + + + Get the persister of the entity that "owns" this collection + + + + Get the surrogate key generation strategy (optional operation) + + + + + Get the type of the surrogate key + + + + Get the "space" that holds the persistent state + + + + Is cascade delete handled by the database-level + foreign key constraint definition? + + + + + Does this collection cause version increment of the owning entity? + + + + Can the elements of this collection change? + + + + Initialize the given collection with the given key + + + + + + + Is this collection role cacheable + + + + + Read the key from a row of the + + + + + Read the element from a row of the + + + + + Read the index from a row of the + + + + + Read the identifier from a row of the + + + + + Is this an "indexed" collection? (list or map) + + + + + Completely remove the persistent state of the collection + + + + + + + (Re)create the collection's persistent state + + + + + + + + Delete the persistent state of any elements that were removed from the collection + + + + + + + + Update the persistent state of any elements that were modified + + + + + + + + Insert the persistent state of any new collection elements + + + + + + + + Does this collection implement "orphan delete"? + + + + + Is this an ordered collection? (An ordered collection is + ordered by the initialization operation, not by sorting + that happens in memory, as in the case of a sorted collection.) + + + + + Generates the collection's key column aliases, based on the given + suffix. + + The suffix to use in the key column alias generation. + The key column aliases. + + + + Generates the collection's index column aliases, based on the given + suffix. + + The suffix to use in the index column alias generation. + The index column aliases, or null if not indexed. + + + + Generates the collection's element column aliases, based on the given + suffix. + + The suffix to use in the element column alias generation. + The element column aliases. + + + + Generates the collection's identifier column aliases, based on the given + suffix. + + The suffix to use in the identifier column alias generation. + The identifier column aliases. + + + + Try to find an element by a given index. + + The key of the collection (collection-owner identifier) + The given index. + The active . + The owner of the collection. + The value of the element where available; otherwise . + + + + A place-holder to inform that the data-reader was empty. + + + + + Generate the SQL UPDATE that updates all the foreign keys to null + + + + + + Generate the SQL UPDATE that updates a foreign key to a value + + + + + + Not needed for one-to-many association + + + + + + Generate the SQL UPDATE that updates a particular row's foreign + key to null. + + Unused, the element is the entity key and should not contain null + values. + + + + Create the + + + + + Summary description for CollectionPropertyMapping. + + + + + The names of all the collection properties. + + + + + Summary description for CompositeElementPropertyMapping. + + + + + Summary description for ElementPropertyMapping. + + + + + Get the batch size of a collection persister. + + + + + A collection role that may be queried or loaded by outer join. + + + + + Get the index formulas if this is an indexed collection + (optional operation) + + + + + Get the persister of the element class, if this is a + collection of entities (optional operation). Note that + for a one-to-many association, the returned persister + must be OuterJoinLoadable. + + + + + Should we load this collection role by outer joining? + + + + + Get the names of the collection index columns if this is an indexed collection (optional operation) + + + + + Get the names of the collection element columns (or the primary key columns in the case of a one-to-many association) + + + + + Does this collection role have a where clause filter? + + + + + Generate a list of collection index and element columns + + + + + Get the names of the collection index columns if + this is an indexed collection (optional operation), + aliased by the given table alias + + + + + Get the names of the collection element columns (or the primary + key columns in the case of a one-to-many association), + aliased by the given table alias + + + + + Get the extra where clause filter SQL + + + + + + + Get the order by SQL + + + + + + + Get the order-by to be applied at the target table of a many to many + + The alias for the many-to-many target table + Appropriate order-by fragment or empty string. + + + + Generate the table alias to use for the collection's key columns + + The alias for the target table + Appropriate table alias. + + + + Superclass for built-in mapping strategies. Implements functionalty common to both mapping + strategies + + + May be considered an immutable view of the mapping object + + + + + Retrieve the version number + + + + Marshall the fields of a persistent instance to a prepared statement + + + + Unmarshall the fields of a persistent instance from a result set, + without resolving associations or collections + + + + + Perform an SQL INSERT, and then retrieve a generated identifier. + + + This form is used for PostInsertIdentifierGenerator-style ids (IDENTITY, select, etc). + + + + + Perform an SQL INSERT. + + + This for is used for all non-root tables as well as the root table + in cases where the identifier value is known before the insert occurs. + + + + Perform an SQL UPDATE or SQL INSERT + + + + Perform an SQL DELETE + + + + + Load an instance using the appropriate loader (as determined by + + + + + The queries that delete rows by id (and version) + + + + + The queries that insert rows with a given id + + + + + The queries that update rows by id (and version) + + + + + The query that inserts a row, letting the database generate an id + + The IDENTITY-based insertion query. + + + + We can't immediately add to the cache if we have formulas + which must be evaluated, or if we have the possibility of + two concurrent updates to the same item being merged on + the database. This can happen if (a) the item is not + versioned and either (b) we have dynamic update enabled + or (c) we have multiple tables holding the state of the + item. + + + + + Decide which tables need to be updated + + The indices of all the entity properties considered dirty. + Whether any collections owned by the entity which were considered dirty. + Array of booleans indicating which table require updating. + + The return here is an array of boolean values with each index corresponding + to a given table in the scope of this persister. + + + + + Generate the SQL that selects the version number by id + + + + + Retrieve the version number + + + + + Warning: + When there are duplicated property names in the subclasses + of the class, this method may return the wrong table + number for the duplicated subclass property (note that + SingleTableEntityPersister defines an overloaded form + which takes the entity name. + + + + + Get the column names for the numbered property of this class + + + + + Must be called by subclasses, at the end of their constructors + + + + Generate the SQL that updates a row by id (and version) + + + Generate the SQL that inserts a row + + + Marshall the fields of a persistent instance to a prepared statement + + + + Unmarshall the fields of a persistent instance from a result set, + without resolving associations or collections + + + + + Perform an SQL INSERT, and then retrieve a generated identifier. + + + This form is used for PostInsertIdentifierGenerator-style ids (IDENTITY, select, etc). + + + + + Perform an SQL INSERT. + + + This for is used for all non-root tables as well as the root table + in cases where the identifier value is known before the insert occurs. + + + + Perform an SQL UPDATE or SQL INSERT + + + + Perform an SQL DELETE + + + + + Load an instance using the appropriate loader (as determined by + + + + + Transform the array of property indexes to an array of booleans, true when the property is dirty + + + + Which properties appear in the SQL update? (Initialized, updateable ones!) + + + + Determines whether the specified entity is an instance of the class + managed by this persister. + + The entity. + + if the specified entity is an instance; otherwise, . + + + + + Concrete IEntityPersisters implement mapping and persistence logic for a particular class. + + + Implementors must be threadsafe (preferably immutable) and must provide a constructor of type + matching the signature of: (PersistentClass, SessionFactoryImplementor) + + + + Locate the property-indices of all properties considered to be dirty. + The current state of the entity (the state to be checked). + The previous state of the entity (the state to be checked against). + The entity for which we are checking state dirtiness. + The session in which the check is occurring. + A cancellation token that can be used to cancel the work + or the indices of the dirty properties + + + Locate the property-indices of all properties considered to be dirty. + The old state of the entity. + The current state of the entity. + The entity for which we are checking state modification. + The session in which the check is occurring. + A cancellation token that can be used to cancel the work + return or the indicies of the modified properties + + + + Retrieve the current state of the natural-id properties from the database. + + + The identifier of the entity for which to retrieve the natural-id values. + + + The session from which the request originated. + + A cancellation token that can be used to cancel the work + The natural-id snapshot. + + + + Load an instance of the persistent class. + + + + + Do a version check (optional operation) + + + + + Persist an instance + + + + + Persist an instance, using a natively generated identifier (optional operation) + + + + + Delete a persistent instance + + + + + Update a persistent instance + + The id. + The fields. + The dirty fields. + if set to [has dirty collection]. + The old fields. + The old version. + The obj. + The rowId + The session. + A cancellation token that can be used to cancel the work + + + + Get the current database state of the object, in a "hydrated" form, without resolving identifiers + + + + A cancellation token that can be used to cancel the work + if select-before-update is not enabled or not supported + + + + Get the current version of the object, or return null if there is no row for + the given identifier. In the case of unversioned data, return any object + if the row exists. + + + + A cancellation token that can be used to cancel the work + + + + Is this a new transient instance? + + + + Perform a select to retrieve the values of any generated properties + back from the database, injecting these generated values into the + given entity as well as writing this state to the persistence context. + + + Note, that because we update the persistence context here, callers + need to take care that they have already written the initial snapshot + to the persistence context before calling this method. + + The entity's id value. + The entity for which to get the state. + The entity state (at the time of Save). + The session. + A cancellation token that can be used to cancel the work + + + + Perform a select to retrieve the values of any generated properties + back from the database, injecting these generated values into the + given entity as well as writing this state to the persistence context. + + + Note, that because we update the persistence context here, callers + need to take care that they have already written the initial snapshot + to the persistence context before calling this method. + + The entity's id value. + The entity for which to get the state. + The entity state (at the time of Save). + The session. + A cancellation token that can be used to cancel the work + + + + The ISessionFactory to which this persister "belongs". + + + + + Returns an object that identifies the space in which identifiers of + this entity hierarchy are unique. + + + + + The entity name which this persister maps. + + + + + Retrieve the underlying entity metamodel instance... + + The metamodel + + + + Returns an array of objects that identify spaces in which properties of + this entity are persisted, for instances of this class only. + + The property spaces. + + For most implementations, this returns the complete set of table names + to which instances of the mapped entity are persisted (not accounting + for superclass entity mappings). + + + + + Returns an array of objects that identify spaces in which properties of + this entity are persisted, for instances of this class and its subclasses. + + + Much like , except that here we include subclass + entity spaces. + + The query spaces. + + + + Are instances of this class mutable? + + + + + Determine whether the entity is inherited one or more other entities. + In other words, is this entity a subclass of other entities. + + True if other entities extend this entity; false otherwise. + + + + Is the identifier assigned before the insert by an IDGenerator or is it returned + by the Insert() method? + + + This determines which form of Insert() will be called. + + + + + Are instances of this class versioned by a timestamp or version number column? + + + + + Get the type of versioning (optional operation) + + + + + Which property holds the version number? (optional operation) + + + + + If the entity defines a natural id (), which + properties make up the natural id. + + + The indices of the properties making of the natural id; or + null, if no natural id is defined. + + + + + Return the IIdentifierGenerator for the class + + + + + Get the Hibernate types of the class properties + + + + + Get the names of the class properties - doesn't have to be the names of the actual + .NET properties (used for XML generation only) + + + + + Gets if the Property is insertable. + + if the Property's value can be inserted. + + This is for formula columns and if the user sets the insert attribute on the <property> element. + + + + Which of the properties of this class are database generated values on insert? + + + Which of the properties of this class are database generated values on update? + + + + Properties that may be dirty (and thus should be dirty-checked). These + include all updatable properties and some associations. + + + + + Get the nullability of the properties of this class + + + + + Get the "versionability" of the properties of this class (is the property optimistic-locked) + + if the property is optimistic-locked; otherwise, . + + + + Get the cascade styles of the properties (optional operation) + + + + + Get the identifier type + + + + + Get the name of the indentifier property (or return null) - need not return the + name of an actual .NET property + + + + + Should we always invalidate the cache instead of recaching updated state + + + + + Should lazy properties of this entity be cached? + + + + + Get the cache (optional operation) + + + + Get the cache structure + + + + Get the user-visible metadata for the class (optional operation) + + + + + Is batch loading enabled? + + + + Is select snapshot before update enabled? + + + + Does this entity contain a version property that is defined + to be database generated? + + + + + Finish the initialization of this object, once all ClassPersisters have been + instantiated. Called only once, before any other method. + + + + + Determine whether the given name represents a subclass entity + (or this entity itself) of the entity mapped by this persister. + + The entity name to be checked. + + True if the given entity name represents either the entity mapped by this persister or one of its subclass entities; + false otherwise. + + + + + Does this class support dynamic proxies? + + + + + Do instances of this class contain collections? + + + + + Determine whether any properties of this entity are considered mutable. + + + True if any properties of the entity are mutable; false otherwise (meaning none are). + + + + + Determine whether this entity contains references to persistent collections + which are fetchable by subselect? + + + True if the entity contains collections fetchable by subselect; false otherwise. + + + + + Does this class declare any cascading save/update/deletes? + + + + + Get the type of a particular property + + + + + + Locate the property-indices of all properties considered to be dirty. + The current state of the entity (the state to be checked). + The previous state of the entity (the state to be checked against). + The entity for which we are checking state dirtiness. + The session in which the check is occurring. + or the indices of the dirty properties + + + Locate the property-indices of all properties considered to be dirty. + The old state of the entity. + The current state of the entity. + The entity for which we are checking state modification. + The session in which the check is occurring. + return or the indicies of the modified properties + + + + Does the class have a property holding the identifier value? + + + + + Determine whether detahced instances of this entity carry their own + identifier value. + + + True if either (1) or + (2) the identifier is an embedded composite identifier; false otherwise. + + + The other option is the deprecated feature where users could supply + the id during session calls. + + + + + Determine whether this entity defines a natural identifier. + + True if the entity defines a natural id; false otherwise. + + + + Retrieve the current state of the natural-id properties from the database. + + + The identifier of the entity for which to retrieve the natural-id values. + + + The session from which the request originated. + + The natural-id snapshot. + + + + Determine whether this entity defines any lazy properties (ala + bytecode instrumentation). + + + True if the entity has properties mapped as lazy; false otherwise. + + + + + Load an instance of the persistent class. + + + + + Do a version check (optional operation) + + + + + Persist an instance + + + + + Persist an instance, using a natively generated identifier (optional operation) + + + + + Delete a persistent instance + + + + + Update a persistent instance + + The id. + The fields. + The dirty fields. + if set to [has dirty collection]. + The old fields. + The old version. + The obj. + The rowId + The session. + + + + Gets if the Property is updatable + + if the Property's value can be updated. + + This is for formula columns and if the user sets the update attribute on the <property> element. + + + + + Does this class have a cache? + + + + + Get the current database state of the object, in a "hydrated" form, without resolving identifiers + + + + if select-before-update is not enabled or not supported + + + + Get the current version of the object, or return null if there is no row for + the given identifier. In the case of unversioned data, return any object + if the row exists. + + + + + + + Has the class actually been bytecode instrumented? + + + + Does this entity define any properties as being database-generated on insert? + + + + + Does this entity define any properties as being database-generated on update? + + + + Called just after the entities properties have been initialized + + + Called just after the entity has been reassociated with the session + + + + Create a new proxy instance + + + + + + + Is this a new transient instance? + + + Return the values of the insertable properties of the object (including backrefs) + + + + Perform a select to retrieve the values of any generated properties + back from the database, injecting these generated values into the + given entity as well as writing this state to the persistence context. + + + Note, that because we update the persistence context here, callers + need to take care that they have already written the initial snapshot + to the persistence context before calling this method. + + The entity's id value. + The entity for which to get the state. + The entity state (at the time of Save). + The session. + + + + Perform a select to retrieve the values of any generated properties + back from the database, injecting these generated values into the + given entity as well as writing this state to the persistence context. + + + Note, that because we update the persistence context here, callers + need to take care that they have already written the initial snapshot + to the persistence context before calling this method. + + The entity's id value. + The entity for which to get the state. + The entity state (at the time of Save). + The session. + + + + The persistent class, or null + + + + + Does the class implement the ILifecycle inteface? + + + + + Does the class implement the IValidatable interface? + + + + + Get the proxy interface that instances of this concrete class will be cast to + + + + + Set the given values to the mapped properties of the given object + + + + + Set the value of a particular property + + + + + Return the values of the mapped properties of the object + + + + + Get the value of a particular property + + + + + Get the value of a particular property + + + + + Get the identifier of an instance ( throw an exception if no identifier property) + + + + + Set the identifier of an instance (or do nothing if no identifier property) + + The object to set the Id property on. + The value to set the Id property to. + + + + Get the version number (or timestamp) from the object's version property (or return null if not versioned) + + + + + Create a class instance initialized with the given identifier + + + + + Determines whether the specified entity is an instance of the class + managed by this persister. + + The entity. + + if the specified entity is an instance; otherwise, . + + + + Does the given instance have any uninitialized lazy properties? + + + + Set the identifier and version of the given instance back + to its "unsaved" value, returning the id + + + + Get the persister for an instance of this class or a subclass + + + + Check the version value trough . + + The snapshot entity state + The result of . + NHibernate-specific feature, not present in H3.2 + + + + Gets EntityMode. + + + + + Implemented by ClassPersister that uses Loader. There are several optional + operations used only by loaders that inherit OuterJoinLoader + + + + + Retrieve property values from one row of a result set + + + + + The discriminator type + + + + + Get the names of columns used to persist the identifier + + + + + Get the name of the column used as a discriminator + + + + + Does the persistent class have subclasses? + + + + + Get the concrete subclass corresponding to the given discriminator value + + + + + Get the result set aliases used for the identifier columns, given a suffix + + + + + Get the result set aliases used for the property columns, given a suffix (properties of this class, only). + + + + + Get the result set column names mapped for this property (properties of this class, only). + + + + + Get the alias used for the discriminator column, given a suffix + + + + Does the result set contain rowids? + + + + Retrieve property values from one row of a result set + + + + + Describes a class that may be loaded via a unique key. + + + + + Load an instance of the persistent class, by a unique key other than the primary key. + + + + + Load an instance of the persistent class, by a unique key other than the primary key. + + + + + Get the property number of the unique key property + + + + + Not really a Loader, just a wrapper around a named query. + + + + + Base implementation of a PropertyMapping. + + + + The property name of the "special" identifier property in HQL + + + + Get the batch size of a entity persister. + + + + + Anything that can be loaded by outer join - namely persisters for classes or collections. + + + + + An identifying name; a class name or collection role name. + + + + + The columns to join on. + + + + + The columns to join on. + + + + + Is this instance actually a ICollectionPersister? + + + + + The table to join to. + + + + + All columns to select, when loading. + + + + + Get the where clause part of any joins (optional operation) + + + + + + + + + Get the from clause part of any joins (optional operation) + + + + + + + + + Get the where clause filter, given a query alias and considering enabled session filters + + + + + Very, very, very ugly... + + Does this persister "consume" entity column aliases in the result + set? + + + + Very, very, very ugly... + + Does this persister "consume" collection column aliases in the result + set? + + + + Contract for things that can be locked via a . + + + Currently only the root table gets locked, except for the case of HQL and Criteria queries + against dialects which do not support either (1) FOR UPDATE OF or (2) support hint locking + (in which case *all* queried tables would be locked). + + + + + Locks are always applied to the "root table". + + + + + Get the names of columns on the root table used to persist the identifier. + + + + + For versioned entities, get the name of the column (again, expected on the + root table) used to store the version values. + + + + + Get the SQL alias this persister would use for the root table + given the passed driving alias. + + + The driving alias; or the alias for the table mapped by this persister in the hierarchy. + + The root table alias. + + + + To build the SQL command in pessimistic lock + + + + + A ClassPersister that may be loaded by outer join using + the OuterJoinLoader hierarchy and may be an element + of a one-to-many association. + + + + + Generate a list of collection index and element columns + + + + + + + + How many properties are there, for this class and all subclasses? (optional operation) + + + + + + May this property be fetched using an SQL outerjoin? + + + + + + + Get the cascade style of this (subclass closure) property + + + + + Is this property defined on a subclass of the mapped class? + + + + + + + Get an array of the types of all properties of all subclasses (optional operation) + + + + + + + Get the name of the numbered property of the class or a subclass + (optional operation) + + + + + + + Is the numbered property of the class of subclass nullable? + + + + + Return the column names used to persist all properties of all sublasses of the persistent class + (optional operation) + + + + + Return the table name used to persist the numbered property of + the class or a subclass + (optional operation) + + + + + Given the number of a property of a subclass, and a table alias, return the aliased column names + (optional operation) + + + + + + + + Get the main from table fragment, given a query alias (optional operation) + + + + + + + Get the column names for the given property path + + + + + Get the table name for the given property path + + + + + Return the aliased identifier column names + + + + + Get the table alias used for the supplied column + + + + + Abstraction of all mappings that define properties: entities, collection elements. + + + + + Get the type of the thing containing the properties + + + + + Given a component path expression, get the type of the property + + + + + + + Given a component path expression, get the type of the property. + + + + true if a type was found, false if not + + + + Given a query alias and a property path, return the qualified column name + + + + + + + Given a property path, return the corresponding column name(s). + + + + Extends the generic ILoadable contract to add operations required by HQL + + + + + Is this class explicit polymorphism only? + + + + + The class that this class is mapped as a subclass of - not necessarily the direct superclass + + + + + The discriminator value for this particular concrete subclass, as a string that may be + embedded in a select statement + + + + + The discriminator value for this particular concrete subclass + + The DiscriminatorValue is specific of NH since we are using strongly typed parameters for SQL query. + + + + Is the inheritance hierarchy described by this persister contained across + multiple tables? + + True if the inheritance hierarchy is spread across multiple tables; false otherwise. + + + + Get the names of all tables used in the hierarchy (up and down) ordered such + that deletes in the given order would not cause constraint violations. + + The ordered array of table names. + + + + For each table specified in , get + the columns that define the key between the various hierarchy classes. + + + The first dimension here corresponds to the table indexes returned in + . + + The second dimension should have the same length across all the elements in + the first dimension. If not, that'd be a problem ;) + + + + + Get the name of the temporary table to be used to (potentially) store id values + when performing bulk update/deletes. + + The appropriate temporary table name. + + + + Get the appropriate DDL command for generating the temporary table to + be used to (potentially) store id values when performing bulk update/deletes. + + The appropriate temporary table creation command. + + + Is the version property included in insert statements? + + + + Given a query alias and an identifying suffix, render the identifier select fragment. + + + + + + + + Given a query alias and an identifying suffix, render the property select fragment. + + + + + Given a property name, determine the number of the table which contains the column + to which this property is mapped. + + The name of the property. + The number of the table to which the property is mapped. + + Note that this is not relative to the results from {@link #getConstraintOrderedTableNameClosure()}. + It is relative to the subclass table name closure maintained internal to the persister (yick!). + It is also relative to the indexing used to resolve {@link #getSubclassTableName}... + + + + Determine whether the given property is declared by our + mapped class, our super class, or one of our subclasses... +

+ Note: the method is called 'subclass property...' simply + for consistency sake (e.g. {@link #getSubclassPropertyTableNumber} +

+ The property name. + The property declarer +
+ + + Get the name of the table with the given index from the internal array. + + The index into the internal array. + + + + + The alias used for any filter conditions (mapped where-fragments or + enabled-filters). + + The root alias + The alias used for "filter conditions" within the where clause. + + This may or may not be different from the root alias depending upon the + inheritance mapping strategy. + + + + + A class persister that supports queries expressed in the platform native SQL dialect. + + + + + Get the type + + + + + Returns the column alias names used to persist/query the numbered property of the class or a subclass (optional operation). + + + + + Return the column names used to persist/query the named property of the class or a subclass (optional operation). + + + + + All columns to select, when loading. + + + + + Given a query alias and an identifying suffix, render the identifier select fragment for joinable entity. + + + + + All columns to select, when loading. + + + + + A IEntityPersister implementing the normalized "table-per-subclass" mapping strategy + + + + + Constructs the NormalizedEntityPerister for the PersistentClass. + + The PersistentClass to create the EntityPersister for. + The configured . + The SessionFactory that this EntityPersister will be stored in. + The mapping used to retrieve type information. + + + + Find the Index of the table name from a list of table names. + + The name of the table to find. + The array of table names + The Index of the table in the array. + Thrown when the tableName specified can't be found + + + + Default implementation of the ClassPersister interface. Implements the + "table-per-class hierarchy" mapping strategy for an entity class. + + + + + Factory for IEntityPersister and ICollectionPersister instances. + + + + + Creates a built in Entity Persister or a custom Persister. + + + + + Creates a specific Persister - could be a built in or custom persister. + + + + + Provides the base functionality to Handle Member calls into a dynamically + generated NHibernate Proxy. + + + This could be an extension point later if the .net framework ever gets a Proxy + class that is similar to the java.lang.reflect.Proxy or if a library similar + to cglib was made in .net. + + + + + Perform an ImmediateLoad of the actual object for the Proxy. + + A cancellation token that can be used to cancel the work + + Thrown when the Proxy has no Session or the Session is closed or disconnected. + + + + + Return the Underlying Persistent Object, initializing if necessary. + + A cancellation token that can be used to cancel the work + The Persistent Object this proxy is Proxying. + + + + If this is returned by Invoke then the subclass needs to Invoke the + method call against the object that is being proxied. + + + + + Create a LazyInitializer to handle all of the Methods/Properties that are called + on the Proxy. + + The entityName + The Id of the Object we are Proxying. + The ISession this Proxy is in. + + + + + + + + + + Perform an ImmediateLoad of the actual object for the Proxy. + + + Thrown when the Proxy has no Session or the Session is closed or disconnected. + + + + + Return the Underlying Persistent Object, initializing if necessary. + + The Persistent Object this proxy is Proxying. + + + + Return the Underlying Persistent Object in a given , or null. + + The Session to get the object from. + The Persistent Object this proxy is Proxying, or . + + + + + + + + + + Perform an ImmediateLoad of the actual object for the Proxy. + + A cancellation token that can be used to cancel the work + + Thrown when the Proxy has no Session or the Session is closed or disconnected. + + + + + Return the underlying persistent object, initializing if necessary. + + A cancellation token that can be used to cancel the work + The persistent object this proxy is proxying. + + + + Perform an ImmediateLoad of the actual object for the Proxy. + + + Thrown when the Proxy has no Session or the Session is closed or disconnected. + + + + + The identifier value for the entity our owning proxy represents. + + + + + The entity-name of the entity our owning proxy represents. + + + + + Get the actual class of the entity. Generally, should be used instead. + + + + + Is the proxy uninitialized? + + + + + Get the session to which this proxy is associated, or null if it is not attached. + + + + + Is the read-only setting available? + + + + + Read-only status + + + + Not available when the proxy is detached or its associated session is closed. + + + To check if the read-only setting is available, use + + + The read-only status of the entity will be made to match the read-only status of the proxy + upon initialization. + + + + + + Return the underlying persistent object, initializing if necessary. + + The persistent object this proxy is proxying. + + + + Return the underlying persistent object in a given , or null. + + The session to get the object from. + The persistent object this proxy is proxying, or . + + + + Initialize the proxy manually by injecting its target. + + The proxy target (the actual entity being proxied). + + + + Associate the proxy with the given session. + + Care should be given to make certain that the proxy is added to the session's persistence context as well + to maintain the symmetry of the association. That must be done separately as this method simply sets an + internal reference. We do also check that if there is already an associated session that the proxy + reference was removed from that previous session's persistence context. + + The session + + + + Unset this initializer's reference to session. It is assumed that the caller is also taking care or + cleaning up the owning proxy's reference in the persistence context. + + Generally speaking this is intended to be called only during and + processing; most other use-cases should call instead. + + + + + Convenient common implementation for ProxyFactory + + + + + Validates whether can be specified as the base class + (or an interface) for a dynamically-generated proxy. + + The type to validate. + + A collection of errors messages, if any, or if none were found. + + + + + Delegate to handle the scenario of an entity not found by a specified id. + + + + + Delegate method to handle the scenario of an entity not found. + + The entityName (may be the class fullname) + The requested id not founded. + + + + A marker interface so NHibernate can know if it is dealing with + an object that is a Proxy. + + + + This interface should not be implemented by anything other than + the Dynamically generated Proxy. If it is implemented by a class then + NHibernate will think that class is a Proxy and will not work. + + + It has to be public scope because + the Proxies are created in a separate DLL than NHibernate. + + + + + Get the underlying lazy initialization handler. + + + Contract for run-time, proxy-based lazy initialization proxies. + + + Called immediately after instantiation of this factory. + + The name of the entity for which this factory should generate proxies. + + + The entity class for which to generate proxies; not always the same as the entityName. + + + The interfaces to expose in the generated proxy; + is already included in this collection. + + + Reference to the identifier getter method; invocation on this method should not force initialization + + + Reference to the identifier setter method; invocation on this method should not force initialization + + + For composite identifier types, a reference to + the type of the identifier + property; again accessing the id should generally not cause + initialization - but need to bear in mind key-many-to-one + mappings. + + Indicates a problem completing post + + Essentially equivalent to constructor injection, but contracted + here via interface. + + + + + Create a new proxy + + The id value for the proxy to be generated. + The session to which the generated proxy will be associated. + The generated proxy. + Indicates problems generating requested proxy. + + + + Proxeability validator. + + + + + Validates whether can be specified as the base class + (or an interface) for a dynamically-generated proxy. + + The type to validate. + + A collection of errors messages, if any, or if none were found. + + + When the configuration property "use_proxy_validator" is set to true(default), the result of this method + is used to throw a detailed exception about the proxeability of the given . + + + + + Validate if a single method can be intercepted by proxy. + + The given method to check. + if the method can be intercepted by proxy. + otherwise. + + + This method can be used internally by the and is used + by to log errors when + a property accessor can't be intercepted by proxy. + The validation of property accessors is fairly enough if you ecampsulate each property. + + + + Lazy initializer for "dynamic-map" entity representations. + + + Proxy for "dynamic-map" entity representations. + + + + NHibernateProxyHelper provides convenience methods for working with + objects that might be instances of Classes or the Proxied version of + the Class. + + + + + Get the class of an instance or the underlying class of a proxy (without initializing the proxy!). + It is almost always better to use the entity name! + + The object to get the type of. + The Underlying Type for the object regardless of if it is a Proxy. + + + + Get the true, underlying class of a proxied persistent class. This operation + will NOT initialize the proxy and thus may return an incorrect result. + + a persistable object or proxy + guessed class of the instance + + This method is approximate match for Session.bestGuessEntityName in H3.2 + + + + Lazy initializer for POCOs + + + + Adds all of the information into the SerializationInfo that is needed to + reconstruct the proxy during deserialization or to replace the proxy + with the instantiated target. + + + This will only be called if the Dynamic Proxy generator does not handle serialization + itself or delegates calls to the method GetObjectData to the LazyInitializer. + + + + + Invokes the method if this is something that the LazyInitializer can handle + without the underlying proxied object being instantiated. + + The name of the method/property to Invoke. + The arguments to pass the method/property. + The proxy object that the method is being invoked on. + + The result of the Invoke if the underlying proxied object is not needed. If the + underlying proxied object is needed then it returns the result + which indicates that the Proxy will need to forward to the real implementation. + + + + + Bind the appropriate value into the given command. + + The command into which the value should be bound. + The parameter-list of the whole query of the command. + The offset from where start the list of , in the given , for the this . + The session against which the current execution is occurring. + A cancellation token that can be used to cancel the work + + Suppose the is composed by two queries. The for the first query is zero. + If the first query in has 12 parameters (size of its SqlType array) the offset to bind all s, of the second query in the + , is 12 (for the first query we are using from 0 to 11). + + + + + Bind the appropriate value into the given command. + + The command into which the value should be bound. + The session against which the current execution is occurring. + A cancellation token that can be used to cancel the work + + Use this method when the contains just 'this' instance of . + Use the overload when the contains more instances of . + + + + + re-set the index of each parameter in the final command. + + The offset from where start the list of , in the given command, for the this . + + Suppose the final command is composed by two queries. The for the first query is zero. + If the first query command has 12 parameters (size of its SqlType array) the offset to bind all s, of the second query in the + command, is 12 (for the first query we are using from 0 to 11). + + This method should be called before call . + + + + + + Bind the appropriate value into the given command. + + The command into which the value should be bound. + The parameter-list of the whole query of the command. + The offset from where start the list of , in the given , for the this . + The session against which the current execution is occurring. + + Suppose the is composed by two queries. The for the first query is zero. + If the first query in has 12 parameters (size of its SqlType array) the offset to bind all s, of the second query in the + , is 12 (for the first query we are using from 0 to 11). + + + + + Bind the appropriate value into the given command. + + The command into which the value should be bound. + The session against which the current execution is occurring. + + Use this method when the contains just 'this' instance of . + Use the overload when the contains more instances of . + + + + + Bind the appropriate value into the given command. + + The command into which the value should be bound. + The parameter-list of the whole query of the command. + The offset from where start the list of , in the given , for the this . + The session against which the current execution is occuring. + A cancellation token that can be used to cancel the work + + + + Bind the appropriate value into the given command. + + The command into which the value should be bound. + The session against which the current execution is occuring. + A cancellation token that can be used to cancel the work + + Use this method when the contains just 'this' instance of . + Use the overload when the contains more instances of . + + + + + Bind the appropriate value into the given command. + + The command into which the value should be bound. + The parameter-list of the whole query of the command. + The offset from where start the list of , in the given , for the this . + The session against which the current execution is occuring. + + + + Bind the appropriate value into the given command. + + The command into which the value should be bound. + The session against which the current execution is occuring. + + Use this method when the contains just 'this' instance of . + Use the overload when the contains more instances of . + + + + + Aliases tables and fields for Sql Statements. + + + Several methods of this class take an additional + parameter, while their Java counterparts + do not. The dialect is used to correctly quote and unquote identifiers. + Java versions do the quoting and unquoting themselves and fail to + consider dialect-specific rules, such as escaping closing brackets in + identifiers on MS SQL 2000. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + An ANSI SQL CASE expression. + case when ... then ... end as ... + + This class looks StringHelper.SqlParameter safe... + + + + An ANSI-style Join. + + + + + A list of that maintains a cache of backtrace positions for performance purpose. + See https://nhibernate.jira.com/browse/NH-3489. + + + + Abstract SQL case fragment renderer + + + + + + + Sets the op + + The op to set + + + + + + + + + + + + + + + + + + + + + + + + + + + + + An Oracle-style DECODE function. + + decode(pkvalue, key1, 1, key2, 2, ..., 0) + + + + + + + + Represents an SQL for update of ... nowait statement + + + + + An Informix-style (theta) Join + + + + + Represents an ... in (...) expression + + + + + Add a value to the value list. Value may be a string, + a , or one of special values + or . + + + + + + + + Builds a SqlString from the internal data. + + A valid SqlString that can be converted into an DbCommand + + + + + + + Represents a SQL JOIN + + + + + Adds condition to buffer without adding " and " prefix. Existing " and" prefix is removed + + + + + An Oracle-style (theta) Join + + + + + This method is a bit of a hack, and assumes + that the column on the "right" side of the + join appears on the "left" side of the + operator, which is extremely weird if this + was a normal join condition, but is natural + for a filter. + + + + + A placeholder for an ADO.NET parameter in an . + + + + + We need to know what the position of the parameter was in a query + before we rearranged the query. + This is the ADO parameter position that this SqlString parameter is + bound to. The SqlString can be safely rearranged once this is set. + + + + + Used to determine the parameter's name (p0,p1 etc.) + + + + + Unique identifier of a parameter to be tracked back by its generator. + + + We have various query-systems. Each one, at the end, give us a . + At the same time we have various bad-guys playing the game (hql function implementations, the dialect...). + A bad guy can rearrange a and the query-system can easly lost organization/sequence of parameters. + Using the the query-system can easily find where are its parameters. + + + + + Used as a placeholder when parsing HQL or SQL queries. + + + + + Create a parameter with the specified position + + + + + Generates an array of parameters. + + The number of parameters to generate. + An array of objects + + + + Determines whether this instance and the specified object + are of the same type and have the same values. + + An object to compare to this instance. + + if the object equals the current instance. + + + + + Gets a hash code for the parameter. + + + An value for the hash code. + + + + + Represents SQL Server SELECT query parser, primarily intended to support generation of + limit queries by SQL Server dialects. + + + + + Column definitions in SELECT clause + + + + + Column definitions for columns that appear in ORDER BY clause + but do not appear in SELECT clause. + + + + + Sort orders as defined in ORDER BY clause + + + + + A SQL query token as returned by + + + + + Position at which this token occurs in a . + + + + + Number of characters in this token. + + + + + Splits a into s. + + + + + token types. + + + + + Whitespace + + + + + Single line comment (preceeded by --) or multi-line comment (terminated by /* and */) + + + + + Keywords, operators or undelimited identifiers. + + + + + Delimited identifiers or string literals. + + + + + A query parameter. + + + + + List separator, the ',' character. + + + + + Begin of an expression block, consisting of a '(' character. + + + + + End of an expression block, consisting of a ')' character. + + + + + Tokens for begin or end of expression blocks. + + + + + Includes all token types except whitespace or comments + + + + + Includes all token types except whitespace + + + + + Includes all token types + + + + + Summary description for QueryJoinFragment. + + + + + Summary description for QuerySelect. + + + + + Certain databases don't like spaces around these operators. + + + This needs to contain both a plain string and a + SqlString version of the operator because the portions in + the WHERE clause will come in as SqlStrings since there + might be parameters, other portions of the clause come in + as strings since there are no parameters. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Adds a string containing a valid "order by" sql statement + to this QuerySelect + + The "order by" sql statement. + + + + + + + + + + + Represents part of an SQL SELECT clause + + + + + Equivalent to ToSqlStringFragment. + + + + In H3, it is called ToFragmentString(). It appears to be + functionally equivalent as ToSqlStringFragment() here. + + + + + The base class for all of the SqlBuilders. + + + + + Converts the ColumnNames and ColumnValues to a WhereFragment + + The names of the Columns to Add to the WhereFragment + A SqlString that contains the WhereFragment + This just calls the overloaded ToWhereFragment() with the operator as " = " and the tableAlias null. + + + + Converts the ColumnNames and ColumnValues to a WhereFragment + + The Alias for the Table. + The names of the Columns to Add to the WhereFragment + A SqlString that contains the WhereFragment + This defaults the op to " = " + + + + Converts the ColumnNames and ColumnValues to a WhereFragment + + The names of the Columns to Add to the WhereFragment + The operator to use between the names & values. For example " = " or "!=" + A SqlString that contains the WhereFragment + + + + Converts the ColumnNames and ColumnValues to a WhereFragment + + The Alias for the Table. + The names of the Columns to Add to the WhereFragment + The operator to use between the names & values. For example " = " or "!=" + A SqlString that contains the WhereFragment + + + + A class that builds an DELETE sql statement. + + + + + Sets the IdentityColumn for the DELETE sql to use. + + An array of the column names for the Property + The IType of the Identity Property. + The SqlDeleteBuilder. + + + + Sets the VersionColumn for the DELETE sql to use. + + An array of the column names for the Property + The IVersionType of the Version Property. + The SqlDeleteBuilder. + + + + Adds the columns for the Type to the WhereFragment + + The names of the columns to add. + The IType of the property. + The operator to put between the column name and value. + The SqlDeleteBuilder + + + + Adds a string to the WhereFragment + + A well formed sql statement with no parameters. + The SqlDeleteBuilder + + + + A class that builds an INSERT sql statement. + + + + + Adds the Property's columns to the INSERT sql + + The column name for the Property + The IType of the property. + The SqlInsertBuilder. + The column will be associated with a parameter. + + + + Add a column with a specific value to the INSERT sql + + The name of the Column to add. + The value to set for the column. + The NHibernateType to use to convert the value to a sql string. + The SqlInsertBuilder. + + + + Add a column with a specific value to the INSERT sql + + The name of the Column to add. + A valid sql string to set as the value of the column. + The SqlInsertBuilder. + + + + Builds a SELECT SQL statement. + + + + + Sets the text that should appear after the FROM + + The fromClause to set + The SqlSelectBuilder + + + + Sets the text that should appear after the FROM + + The name of the Table to get the data from + The Alias to use for the table name. + The SqlSelectBuilder + + + + Sets the text that should appear after the FROM + + The fromClause in a SqlString + The SqlSelectBuilder + + + + Sets the text that should appear after the ORDER BY. + + The orderByClause to set + The SqlSelectBuilder + + + + Sets the text that should appear after the GROUP BY. + + The groupByClause to set + The SqlSelectBuilder + + + + Sets the SqlString for the OUTER JOINs. + + + All of the Sql needs to be included in the SELECT. No OUTER JOINS will automatically be + added. + + The outerJoinsAfterFrom to set + The outerJoinsAfterWhere to set + The SqlSelectBuilder + + + + Sets the text for the SELECT + + The selectClause to set + The SqlSelectBuilder + + + + Sets the text for the SELECT + + The selectClause to set + The SqlSelectBuilder + + + + Sets the criteria to use for the WHERE. It joins all of the columnNames together with an AND. + + + The names of the columns + The Hibernate Type + The SqlSelectBuilder + + + + Sets the prebuilt SqlString to the Where clause + + The SqlString that contains the sql and parameters to add to the WHERE + This SqlSelectBuilder + + + + Sets the criteria to use for the WHERE. It joins all of the columnNames together with an AND. + + + The names of the columns + The Hibernate Type + The SqlSelectBuilder + + + + Sets the prebuilt SqlString to the Having clause + + The SqlString that contains the sql and parameters to add to the HAVING + This SqlSelectBuilder + + + + ToSqlString() is named ToStatementString() in H3 + + + + + + + + + Summary description for SqlSimpleSelectBuilder. + + + + + + + + + + + + Adds a columnName to the SELECT fragment. + + The name of the column to add. + The SqlSimpleSelectBuilder + + + + Adds a columnName and its Alias to the SELECT fragment. + + The name of the column to add. + The alias to use for the column + The SqlSimpleSelectBuilder + + + + Adds an array of columnNames to the SELECT fragment. + + The names of the columns to add. + The SqlSimpleSelectBuilder + + + + Adds an array of columnNames with their Aliases to the SELECT fragment. + + The names of the columns to add. + The aliases to use for the columns + The SqlSimpleSelectBuilder + + + + Gets the Alias that should be used for the column + + The name of the column to get the Alias for. + The Alias if one exists, null otherwise + + + + Sets the IdentityColumn for the SELECT sql to use. + + An array of the column names for the Property + The IType of the Identity Property. + The SqlSimpleSelectBuilder. + + + + Sets the VersionColumn for the SELECT sql to use. + + An array of the column names for the Property + The IVersionType of the Version Property. + The SqlSimpleSelectBuilder. + + + + Set the Order By fragment of the Select Command + + The OrderBy fragment. It should include the SQL "ORDER BY" + The SqlSimpleSelectBuilder + + + + Adds the columns for the Type to the WhereFragment + + The names of the columns to add. + The IType of the property. + The operator to put between the column name and value. + The SqlSimpleSelectBuilder + + + + Adds an arbitrary where fragment. + + The fragment. + The SqlSimpleSelectBuilder + + + + + + + This is a non-modifiable SQL statement that is ready to be prepared + and sent to the Database for execution. + + + A represents a (potentially partial) SQL query string + that may or may not contain query parameter references. A + decomposes the underlying SQL query string into a list of parts. Each part is either + 1) a string part, which represents a fragment of the underlying SQL query string that + does not contain any parameter references, or 2) a parameter part, which represents + a single query parameter reference in the underlying SQL query string. + + The constructors ensure that the number of string parts + in a are kept to an absolute minimum (as compact as possible) + by concatenating any adjoining string parts into a single string part. + + + Substring operations on a (such as , + , ) return a that reuses the parts + list of the instance on which the operation was performed. + Besides a reference to this parts list, the resulting instance + also stores the character offset into the original underlying SQL string at which the + substring starts and the length of the substring. By avoiding the unnecessary rebuilding + of part lists these operations have O(1) behaviour rather than O(n) behaviour. + + + If you need to modify this object pass it to a and + get a new object back from it. + + + + + + Empty instance. + + + + + Immutable list of string and parameter parts that make up this . + This list may be shared by multiple instances that present + different fragments of a common underlying SQL query string. + + + + + List of SQL query parameter references that occur in this . + + + + + Cached index of first part in that contains (part of) + a SQL fragment that falls within the scope of this instance. + + + + + Cached index of last part in that contains (part of) + a SQL fragment that falls within the scope of this instance. + + + + + Index of first character of the underlying SQL query string that is within scope of + this instance. + + + + + Number of characters of the underlying SQL query string that are within scope of + this instance from onwards. + + + + + Creates copy of other . + + + + + + Creates substring of other . + + + + + + + + Creates consisting of single string part. + + A SQL fragment + + + + Creates consisting of single parameter part. + + A query parameter + + + + Creates consisting of multiple parts. + + Arbitrary number of parts, which must be + either , or + values. + The instance is automatically compacted. + + + + Parse SQL in and create a SqlString representing it. + + + Parameter marks in single quotes will be correctly skipped, but otherwise the + lexer is very simple and will not parse double quotes or escape sequences + correctly, for example. + + + + + Gets the number of SqlParts contained in this SqlString. + + The number of SqlParts contained in this SqlString. + + + + Appends the SqlString parameter to the end of the current SqlString to create a + new SqlString object. + + The SqlString to append. + A new SqlString object. + + A SqlString object is immutable so this returns a new SqlString. If multiple Appends + are called it is better to use the SqlStringBuilder. + + + + + Appends the string parameter to the end of the current SqlString to create a + new SqlString object. + + The string to append. + A new SqlString object. + + A SqlString object is immutable so this returns a new SqlString. If multiple Appends + are called it is better to use the SqlStringBuilder. + + + + + Makes a copy of the SqlString, with new parameter references (Placeholders) + + + + + Determines whether the end of this instance matches the specified String. + + A string to seek at the end. + if the end of this instance matches value; otherwise, + + + + Returns the index of the first occurrence of , case-insensitive. + + Text to look for in the . Must be in lower + case. + + The text must be located entirely in a string part of the . + Searching for "a ? b" in an consisting of + "a ", Parameter, " b" will result in no matches. + + The index of the first occurrence of , or -1 + if not found. + + + + Returns the index of the first occurrence of , case-insensitive. + + Text to look for in the . Must be in lower + The zero-based index of the search starting position. + The number of character positions to examine. + One of the enumeration values that specifies the rules for the search. + + The text must be located entirely in a string part of the . + Searching for "a ? b" in an consisting of + "a ", Parameter, " b" will result in no matches. + + The index of the first occurrence of , or -1 + if not found. + + + + Returns the index of the first occurrence of , case-insensitive. + + Text to look for in the . Must be in lower + case. + + The text must be located entirely in a string part of the . + Searching for "a ? b" in an consisting of + "a ", Parameter, " b" will result in no matches. + + The index of the first occurrence of , or -1 + if not found. + + + + Returns the index of the first occurrence of , case-insensitive. + + Text to look for in the . Must be in lower case. + The zero-based index of the search starting position. + The number of character positions to examine. + One of the enumeration values that specifies the rules for the search. + + The text must be located entirely in a string part of the . + Searching for "a ? b" in an consisting of + "a ", Parameter, " b" will result in no matches. + + The index of the first occurrence of , or -1 + if not found. + + + + Replaces all occurrences of a specified in this instance, + with another specified . + + A String to be replaced. + A String to replace all occurrences of oldValue. + + A new SqlString with oldValue replaced by the newValue. The new SqlString is + in the compacted form. + + + + + Determines whether the beginning of this SqlString matches the specified System.String, + using case-insensitive comparison. + + The System.String to seek + true if the SqlString starts with the value. + + + + Determines whether the sqlString matches the specified System.String, + using case-insensitive comparison + + The System.String to match + true if the SqlString matches the value. + + + + Retrieves a substring from this instance. The substring starts at a specified character position. + + The starting character position of a substring in this instance. + + A new SqlString to the substring that begins at startIndex in this instance. + + + If the startIndex is greater than the length of the SqlString then is returned. + + + + + Returns substring of this SqlString starting with the specified + . If the text is not found, returns an + empty, not-null SqlString. + + + The method performs case-insensitive comparison, so the + passed should be in lower case. + + + + + Returns true if content is empty or white space characters only + + + + + Removes all occurrences of white space characters from the beginning and end of this instance. + + + A new SqlString equivalent to this instance after white space characters + are removed from the beginning and end. + + + + + Locate the part that contains the requested character index, and return the + part's index. Return -1 if the character position isn't found. + + + + + It the pendingContent is non-empty, append it as a new part and reset the pendingContent + to empty. The new part will be given the sqlIndex. After return, the sqlIndex will have + been updated to the next available index. + + + + + + + Returns the SqlString in a string where it looks like + SELECT col1, col2 FROM table WHERE col1 = ? + + + The question mark is used as the indicator of a parameter because at + this point we are not using the specific provider so we don't know + how that provider wants our parameters formatted. + + A provider-neutral version of the CommandText + + + + The SqlStringBuilder is used to construct a SqlString. + + + + The SqlString is a nonmutable class so it can't have sql parts added + to it. Instead this class should be used to generate a new SqlString. + The SqlStringBuilder is to SqlString what the StringBuilder is to + a String. + + + This is different from the original version of SqlString because this does not + hold the sql string in the form of "column1=@column1" instead it uses an array to + build the sql statement such that + object[0] = "column1=" + object[1] = ref to column1 parameter + + + What this allows us to do is to delay the generating of the parameter for the sql + until the very end - making testing dialect indifferent. Right now all of our test + to make sure the correct sql is getting built are specific to MsSql2000Dialect. + + + + + + Create an empty StringBuilder with the default capacity. + + + + + Create a StringBuilder with a specific capacity. + + The number of parts expected. + + + + Create a StringBuilder to modify the SqlString + + The SqlString to modify. + + + + Adds the preformatted sql to the SqlString that is being built. + + The string to add. + This SqlStringBuilder + + + + Adds the Parameter to the SqlString that is being built. + The correct operator should be added before the Add(Parameter) is called + because there will be no operator ( such as "=" ) placed between the last Add call + and this Add call. + + The Parameter to add. + This SqlStringBuilder + + + + Attempts to discover what type of object this is and calls the appropriate + method. + + The part to add when it is not known if it is a Parameter, String, or SqlString. + This SqlStringBuilder. + Thrown when the part is not a Parameter, String, or SqlString. + + + + Adds an existing SqlString to this SqlStringBuilder. It does NOT add any + prefix, postfix, operator, or wrap around this. It is equivalent to just + adding a string. + + The SqlString to add to this SqlStringBuilder + This SqlStringBuilder + + + + Adds an existing SqlString to this SqlStringBuilder + + The SqlString to add to this SqlStringBuilder + String to put at the beginning of the combined SqlString. + How these Statements should be junctioned "AND" or "OR" + String to put at the end of the combined SqlString. + This SqlStringBuilder + + This calls the overloaded Add method with an array of SqlStrings and wrapStatement=false + so it will not be wrapped with a "(" and ")" + + + + + Adds existing SqlStrings to this SqlStringBuilder + + The SqlStrings to combine. + String to put at the beginning of the combined SqlString. + How these SqlStrings should be junctioned "AND" or "OR" + String to put at the end of the combined SqlStrings. + This SqlStringBuilder + This calls the overloaded Add method with wrapStatement=true + + + + Adds existing SqlStrings to this SqlStringBuilder + + The SqlStrings to combine. + String to put at the beginning of the combined SqlStrings. + How these SqlStrings should be junctioned "AND" or "OR" + String to put at the end of the combined SqlStrings. + Wrap each SqlStrings with "(" and ")" + This SqlStringBuilder + + + + Gets the number of SqlParts in this SqlStringBuilder. + + + The number of SqlParts in this SqlStringBuilder. + + + + + Gets or Sets the element at the index + + Returns a string or Parameter. + + + + + Insert a string containing sql into the SqlStringBuilder at the specified index. + + The zero-based index at which the sql should be inserted. + The string containing sql to insert. + This SqlStringBuilder + + + + Insert a Parameter into the SqlStringBuilder at the specified index. + + The zero-based index at which the Parameter should be inserted. + The Parameter to insert. + This SqlStringBuilder + + + + Removes the string or Parameter at the specified index. + + The zero-based index of the item to remove. + This SqlStringBuilder + + + + Converts the mutable SqlStringBuilder into the immutable SqlString. + + The SqlString that was built. + + + + Helper methods for SqlString. + + + + + A class that builds an UPDATE sql statement. + + + + + Add a column with a specific value to the UPDATE sql + + The name of the Column to add. + The value to set for the column. + The NHibernateType to use to convert the value to a sql string. + The SqlUpdateBuilder. + + + + Add a column with a specific value to the UPDATE sql + + The name of the Column to add. + A valid sql string to set as the value of the column. + The SqlUpdateBuilder. + + + + Adds columns with a specific value to the UPDATE sql + + The names of the Columns to add. + A valid sql string to set as the value of the column. This value is assigned to each column. + The SqlUpdateBuilder. + + + + Adds the Property's columns to the UPDATE sql + + An array of the column names for the Property + The IType of the property. + The SqlUpdateBuilder. + + + + Adds the Property's updatable columns to the UPDATE sql + + An array of the column names for the Property + An array of updatable column flags. If this array is null, all supplied columns are considered updatable. + The IType of the property. + The SqlUpdateBuilder. + + + + Sets the IdentityColumn for the UPDATE sql to use. + + An array of the column names for the Property + The IType of the Identity Property. + The SqlUpdateBuilder. + + + + Sets the VersionColumn for the UPDATE sql to use. + + An array of the column names for the Property + The IVersionType of the Version Property. + The SqlUpdateBuilder. + + + + Adds the columns for the Type to the WhereFragment + + The names of the columns to add. + The IType of the property. + The operator to put between the column name and value. + The SqlUpdateBuilder + + + + Adds a string to the WhereFragment + + A well formed sql string with no parameters. + The SqlUpdateBuilder + + + + + + + Given an SQL SELECT statement, parse it to extract clauses starting with + FROM, up to and not including ORDER BY (known collectively + as a subselect clause). + + + + + Contains the subselect clause as it is being built. + + + + + Initializes a new instance of the class. + + The to extract the subselect clause from. + + + + Looks for a FROM clause in the + and adds the clause to the result if found. + + A or a . + if the part contained a FROM clause, + otherwise. + + + + Returns the subselect clause of the statement + being processed. + + An containing + the subselect clause of the original SELECT + statement. + + + + Allows us to construct SQL WHERE fragments + + + + + Contract for delegates responsible for managing connection used by the hbm2ddl tools. + + + + + Prepare the helper for use. + + A cancellation token that can be used to cancel the work + + + + Prepare the helper for use. + + + + + Get a reference to the connection we are using. + + + + + Release any resources held by this helper. + + + + + A implementation based on an internally + built and managed . + + + + + Generates ddl to export table schema for a configured Configuration to the database + + + This Class can be used directly or the command line wrapper NHibernate.Tool.hbm2ddl.exe can be + used when a dll can not be directly used. + + + + + Run the schema creation script + + if the ddl should be outputted in the Console. + if the ddl should be executed against the Database. + A cancellation token that can be used to cancel the work + + This is a convenience method that calls and sets + the justDrop parameter to false. + + + + + Run the schema creation script + + an action that will be called for each line of the generated ddl. + if the ddl should be executed against the Database. + A cancellation token that can be used to cancel the work + + This is a convenience method that calls and sets + the justDrop parameter to false. + + + + + Run the schema creation script + + if non-null, the ddl will be written to this TextWriter. + if the ddl should be executed against the Database. + A cancellation token that can be used to cancel the work + + This is a convenience method that calls and sets + the justDrop parameter to false. + + + + + Run the drop schema script + + if the ddl should be outputted in the Console. + if the ddl should be executed against the Database. + A cancellation token that can be used to cancel the work + + This is a convenience method that calls and sets + the justDrop parameter to true. + + + + + Run the drop schema script + + if non-null, the ddl will be written to this TextWriter. + if the ddl should be executed against the Database. + A cancellation token that can be used to cancel the work + + This is a convenience method that calls and sets + the justDrop parameter to true. + + + + + Executes the Export of the Schema in the given connection + + if the ddl should be outputted in the Console. + if the ddl should be executed against the Database. + if only the ddl to drop the Database objects should be executed. + + The connection to use when executing the commands when export is . + Must be an opened connection. The method doesn't close the connection. + + The writer used to output the generated schema + A cancellation token that can be used to cancel the work + + This method allows for both the drop and create ddl script to be executed. + This overload is provided mainly to enable use of in memory databases. + It does NOT close the given connection! + + + + + Executes the Export of the Schema. + + if the ddl should be outputted in the Console. + if the ddl should be executed against the Database. + if only the ddl to drop the Database objects should be executed. + A cancellation token that can be used to cancel the work + + This method allows for both the drop and create ddl script to be executed. + + + + + Create a schema exported for a given Configuration + + The NHibernate Configuration to generate the schema from. + + + + Create a schema exporter for the given Configuration, with the given + database connection properties + + The NHibernate Configuration to generate the schema from. + The Properties to use when connecting to the Database. + + + + Set the output filename. The generated script will be written to this file + + The name of the file to output the ddl to. + The SchemaExport object. + + + + Set the end of statement delimiter + + The end of statement delimiter. + The SchemaExport object. + + + + Run the schema creation script + + if the ddl should be outputted in the Console. + if the ddl should be executed against the Database. + + This is a convenience method that calls and sets + the justDrop parameter to false. + + + + + Run the schema creation script + + an action that will be called for each line of the generated ddl. + if the ddl should be executed against the Database. + + This is a convenience method that calls and sets + the justDrop parameter to false. + + + + + Run the schema creation script + + if non-null, the ddl will be written to this TextWriter. + if the ddl should be executed against the Database. + + This is a convenience method that calls and sets + the justDrop parameter to false. + + + + + Run the drop schema script + + if the ddl should be outputted in the Console. + if the ddl should be executed against the Database. + + This is a convenience method that calls and sets + the justDrop parameter to true. + + + + + Run the drop schema script + + if non-null, the ddl will be written to this TextWriter. + if the ddl should be executed against the Database. + + This is a convenience method that calls and sets + the justDrop parameter to true. + + + + + Executes the Export of the Schema in the given connection + + if the ddl should be outputted in the Console. + if the ddl should be executed against the Database. + if only the ddl to drop the Database objects should be executed. + + The connection to use when executing the commands when export is . + Must be an opened connection. The method doesn't close the connection. + + The writer used to output the generated schema + + This method allows for both the drop and create ddl script to be executed. + This overload is provided mainly to enable use of in memory databases. + It does NOT close the given connection! + + + + + Executes the Export of the Schema. + + if the ddl should be outputted in the Console. + if the ddl should be executed against the Database. + if only the ddl to drop the Database objects should be executed. + + This method allows for both the drop and create ddl script to be executed. + + + + + Execute the schema updates + + + + + Execute the schema updates + + The action to write the each schema line. + Commit the script to DB + A cancellation token that can be used to cancel the work + + + + Returns a List of all Exceptions which occurred during the export. + + + + + + Execute the schema updates + + + + + Execute the schema updates + + The action to write the each schema line. + Commit the script to DB + + + + A implementation based on an explicitly supplied + connection. + + + + + A implementation based on a provided + . Essentially, ensures that the connection + gets cleaned up, but that the provider itself remains usable since it + was externally provided to us. + + + + + This acts as a template method. Specific Reader instances + override the component methods. + + + + + Minimal factory implementation. + Does not support system . + + + + + + + + + + + + + + + + + + + + + + + + + + factory implementation supporting system + . + + + + + + + + See . + + + + + See . + + + + + + + + + + + + + + Enlist the session in the supplied transaction. + + The session to enlist. + The transaction to enlist with. Can be . + + + + Create a transaction context for enlisting a session with a , + and enlist the context in the transaction. + + The session to be enlisted. + The transaction into which the context has to be enlisted. + The created transaction context. + + + + Create a transaction context for a dependent session. + + The dependent session. + The context of the session owning the . + A dependent context for the session. + + + + + + + + + + Transaction context for enlisting a session with a system . + It is meant for being the concrete class enlisted in the transaction. + + + + + The transaction in which this context is enlisted. + + + + + + + + + + + + + + Default constructor. + + The session to enlist with the transaction. + The transaction into which the context will be enlisted. + See . + See . + + + + + + + Lock the context, causing to block until released. Do nothing if the context + has already been locked once. + + + + + Unlock the context, causing to cease blocking. Do nothing if the context + is not locked. + + + + + Safely get the of the context transaction. + + The of the context transaction, or + if it cannot be obtained. + The status may no more be obtainable during transaction completion events in case of + rollback. + + + + Prepare the session for the transaction commit. Run + for the session and for + if any. the context + before signaling it is done, or before rollback in case of failure. + + The object for notifying the prepare phase outcome. + + + + Handle the second phase callbacks. Has no actual work to do excepted signaling it is done. + + The enlistment object for signaling to the transaction manager the notification has been handled. + if this is a commit callback, if this is a rollback + callback, if this is an in-doubt callback. + + + + Handle the transaction completion. Notify of the end of the + transaction. Notify end of transaction to the session and to + if any. Close sessions requiring it then cleanup transaction contextes and then blocked + threads. + + if the transaction is committed, + otherwise. + + + + + + + Dispose of the context. + + if called by . + otherwise. Do not access managed resources if it is + false. + + + + Transaction context for enlisting a dependent session. Dependent sessions are not owning + their . The session owning it will have a transaction context + handling all actions for dependent sessions. + + + + + + + + + + + + + + The transaction context of the session owning the . + + + + + Default constructor. + + The transaction context of the session owning the + . + + + + + + + + + + Dispose of the context. + + if called by . + otherwise. Do not access managed resources if it is + false. + + + + Wraps an ADO.NET to implement + the interface. + + + + + Commits the by flushing asynchronously the + then committing synchronously the . + + A cancellation token that can be used to cancel the work + + Thrown if there is any exception while trying to call Commit() on + the underlying . + + + + + Rolls back the by calling the method Rollback + on the underlying . + + A cancellation token that can be used to cancel the work + + Thrown if there is any exception while trying to call Rollback() on + the underlying . + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + Indicates if this AdoTransaction is being Disposed of or Finalized. + A cancellation token that can be used to cancel the work + + If this AdoTransaction is being Finalized (isDisposing==false) then make sure not + to call any methods that could potentially bring this AdoTransaction back to life. + + + + + Initializes a new instance of the class. + + The the Transaction is for. + + + + Enlist the in the current . + + The to enlist in this Transaction. + + + This takes care of making sure the 's Transaction property + contains the correct or if there is no + Transaction for the ISession - ie BeginTransaction() not called. + + + This method may be called even when the transaction is disposed. + + + + + + Begins the on the + used by the . + + + Thrown if there is any problems encountered while trying to create + the . + + + + + Commits the by flushing the + and committing the . + + + Thrown if there is any exception while trying to call Commit() on + the underlying . + + + + + Rolls back the by calling the method Rollback + on the underlying . + + + Thrown if there is any exception while trying to call Rollback() on + the underlying . + + + + + Gets a indicating if the transaction was rolled back. + + + if the had Rollback called + without any exceptions. + + + + + Gets a indicating if the transaction was committed. + + + if the had Commit called + without any exceptions. + + + + + A flag to indicate if Disose() has been called. + + + + + Finalizer that ensures the object is correctly disposed of. + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + Indicates if this AdoTransaction is being Disposed of or Finalized. + + If this AdoTransaction is being Finalized (isDisposing==false) then make sure not + to call any methods that could potentially bring this AdoTransaction back to life. + + + + + + A factory interface for instances. + Concrete implementations are specified by transaction.factory_class + configuration property. + + + Implementors must be threadsafe and should declare a public default constructor. + + + + + + + Execute a work outside of the current transaction (if any). + + The session for which an isolated work has to be executed. + The work to execute. + for encapsulating the work in a dedicated + transaction, for not transacting it. + A cancellation token that can be used to cancel the work + + + + Configure from the given properties. + + The configuration properties. + + + + Create a new and return it without starting it. + + The session for which to create a new transaction. + The created transaction. + + + + + If supporting system , enlist the session in + the ambient transaction if any. This method may be call multiple times for the same ambient + transaction, and must support it. (Avoid re-enlisting the session if already enlisted.) + + Do nothing if the transaction factory does not support system transaction, or + if the session auto-join transaction option is disabled. + + The session having to participate in the ambient system transaction if any. + + + + Enlist the session in the current system . + + The session to enlist. + Thrown if the transaction factory does not support system + transactions. + Thrown if there is no current transaction. + + + + If supporting system , indicate whether the given + is currently enlisted in an system transaction. Otherwise + . + + + if the session is enlisted in an system transaction. + + When a is distributed, a number of processing will run + on dedicated threads, and may call this. This method must not rely on + : it may not be relevant for the + . + + + + + Execute a work outside of the current transaction (if any). + + The session for which an isolated work has to be executed. + The work to execute. + for encapsulating the work in a dedicated + transaction, for not transacting it. + + + + Create an AfterTransactionCompletes that will execute the given delegate + when the transaction is completed. The action delegate will receive + the value 'true' if the transaction was completed successfully. + + + + + + A mimic to the javax.transaction.Synchronization callback to enable + + + + + Contract representing processes that needs to occur before or after transaction completion. + + + + + This is used as a marker interface for the different + transaction context required for each session + + + + + Is the transaction still active? + + + + + Should the session be closed upon transaction completion? + + + + + Can the transaction completion trigger a flush? + + + + + With some transaction factory, synchronization of session may be required. This method should be called + by session before each of its usage where a concurrent transaction completion action could cause a thread + safety issue. This method is already called by + and . + + + + This method is required due to MSDTC asynchronism. When a transaction is promoted to distributed, MSDTC + starts handling it. See https://github.com/npgsql/npgsql/issues/1571#issuecomment-308651461 for a discussion + about it. + + + MSDTC considers the transaction to be committed as soon as it has collected all positive votes from prepare + phases of enlisted resources + (). + It then concurrently lets the disposal leave and allow + the code following it to execute, raises transaction completion event + () and calls all resources second phase + callbacks (). + + + For rollback cases, it depends on what has triggered the rollback. The transaction is marked as aborted. The + transaction completion event is raised. If the rollback has been triggered by a resource prepare phase, the + rollback callback of that resource will not be called. Prepare phase may not have been called at all for some + rollback cases. The called rollback callbacks execute concurrently with transaction completion event and + code following the scope disposal. + (See (.) + + + In-doubt cases are similar to rollback cases. The transaction completion event is raised too, and run + concurrently to in-doubt callbacks + () and + code following the scope disposal. + + + Due to this, for avoiding concurrency races, this method should block before the last resource signals it is + prepared (), and if it detects the transaction + is no more active () while not having already + blocked. It should be released only once the and + transaction completion events and cleanups have been handled. + + + + + Logic to bind stream of byte into a VARBINARY + + + Convert the byte[] into the expected object type + + + Convert the object into the internal byte[] representation + + + + + + + + + + Base class for date time types. + + + + + + + + + + + Returns the for the type. + + + + + + + + Retrieve the current system time. + + if is , + otherwise. + + + + Default constructor. + + + + + Constructor for overriding the default . + + The to use. + + + + Adjust the date time value for this type from an arbitrary date time value. + + The to adjust. + A . + + + + + + + + + + Get the in the for the Property. + + The that contains the value. + The index of the field to get the value from. + The session for which the operation is done. + An object with the value from the database. + + + + + + + + + + Round a according to specified resolution. + + The value to round. + The resolution in ticks (100ns). + A rounded . + + + + + + + + + + Compares two object and also compare its Kind if needed, which is not used by the + .Net Framework implementation. + + The first date time to compare. + The second date time to compare. + if they are equals, otherwise. + + + + + + + + + + + + + + + + + + + + + + + + + The base implementation of the interface. + Mapping of the built in Type hierarchy. + + + + + Disassembles the object into a cacheable representation. + + The value to disassemble. + The is not used by this method. + optional parent entity object (needed for collections) + A cancellation token that can be used to cancel the work + The disassembled, deep cloned state of the object + + This method calls DeepCopy if the value is not null. + + + + + Reconstructs the object from its cached "disassembled" state. + + The disassembled state from the cache + The is not used by this method. + The parent Entity object is not used by this method + A cancellation token that can be used to cancel the work + The assembled object. + + This method calls DeepCopy if the value is not null. + + + + + Should the parent be considered dirty, given both the old and current + field or element value? + + The old value + The current value + The is not used by this method. + A cancellation token that can be used to cancel the work + true if the field is dirty + This method uses IType.Equals(object, object) to determine the value of IsDirty. + + + + Retrieves an instance of the mapped class, or the identifier of an entity + or collection from a . + + The that contains the values. + + The names of the columns in the that contain the + value to populate the IType with. + + the session + The parent Entity + A cancellation token that can be used to cancel the work + An identifier or actual object mapped by this IType. + + This method uses the IType.NullSafeGet(DbDataReader, string[], ISessionImplementor, object) method + to Hydrate this . + + + + + Maps identifiers to Entities or Collections. + + An identifier or value returned by Hydrate() + The is not used by this method. + The parent Entity is not used by this method. + A cancellation token that can be used to cancel the work + The value. + + There is nothing done in this method other than return the value parameter passed in. + + + + + Says whether the value has been modified + + + + + + + + + + + + + + + + + Gets a value indicating if the is an . + + false - by default an is not an . + + + + Gets a value indicating if the is a . + + false - by default an is not a . + + + + Gets a value indicating if the is an . + + false - by default an is not an . + + + + Gets a value indicating if the is a . + + false - by default an is not a . + + + + Disassembles the object into a cacheable representation. + + The value to disassemble. + The is not used by this method. + optional parent entity object (needed for collections) + The disassembled, deep cloned state of the object + + This method calls DeepCopy if the value is not null. + + + + + Reconstructs the object from its cached "disassembled" state. + + The disassembled state from the cache + The is not used by this method. + The parent Entity object is not used by this method + The assembled object. + + This method calls DeepCopy if the value is not null. + + + + + Should the parent be considered dirty, given both the old and current + field or element value? + + The old value + The current value + The is not used by this method. + true if the field is dirty + This method uses IType.Equals(object, object) to determine the value of IsDirty. + + + + Retrieves an instance of the mapped class, or the identifier of an entity + or collection from a . + + The that contains the values. + + The names of the columns in the that contain the + value to populate the IType with. + + the session + The parent Entity + An identifier or actual object mapped by this IType. + + This method uses the IType.NullSafeGet(DbDataReader, string[], ISessionImplementor, object) method + to Hydrate this . + + + + + Maps identifiers to Entities or Collections. + + An identifier or value returned by Hydrate() + The is not used by this method. + The parent Entity is not used by this method. + The value. + + There is nothing done in this method other than return the value parameter passed in. + + + + + Gets a value indicating if the implementation is an "object" type + + false - by default an is not a "object" type. + + + + Says whether the value has been modified + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Handles "any" mappings and the old deprecated "object" type. + + + The identifierType is any NHibernate IType that can be serailized by default. + For example, you can specify the identifierType as an Int32 or a custom identifier + type that you built. The identifierType matches to one or many columns. + + The metaType maps to a single column. By default it stores the name of the Type + that the Identifier identifies. + + For example, we can store a link to any table. It will have the results + class_name id_col1 + ======================================== + Simple, AssemblyName 5 + DiffClass, AssemblyName 5 + Simple, AssemblyName 4 + + You can also provide you own type that might map the name of the class to a table + with a giant switch statement or a good naming convention for your class->table. The + data stored might look like + class_name id_col1 + ======================================== + simple_table 5 + diff_table 5 + simple_table 4 + + + + + + Not really relevant to AnyType, since it cannot be "joined" + + + + + An that maps an collection + to the database. + + + + + + + + + + + A cancellation token that can be used to cancel the work + + + + Initializes a new instance of a class for + a specific role. + + The role the persistent collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + The of the element contained in the array. + + This creates a bag that is non-generic. + + + + + The for the element. + + + + + + + + + + + + + + Wraps a in a . + + The for the collection to be a part of. + The unwrapped array. + + An that wraps the non NHibernate . + + + + + + + + Maps a property + to a column. + + + + + + + + + + + ClassMetaType is a NH specific type to support "any" with meta-type="class" + + + It work like a MetaType where the key is the entity-name it self + + + + + The base class for an that maps collections + to the database. + + + + + Get the key value from the owning entity instance. It is usually the identifier, but it might be some + other unique key, in the case of a property-ref. + + + + + Initializes a new instance of a class for + a specific role. + + The role the persistent collection is in. + + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + + + + + Instantiate an uninitialized collection wrapper or holder. Callers MUST add the holder to the + persistence context! + + The session from which the request is originating. + The underlying collection persister (metadata) + The owner key. + The instantiated collection. + + + + Wrap the naked collection instance in a wrapper, or instantiate a + holder. Callers MUST add the holder to the persistence context! + + The session from which the request is originating. + The bare collection to be wrapped. + + A subclass of that wraps the non NHibernate collection. + + + + + We always need to dirty check the collection because we sometimes + need to increment version number of owner and also because of + how assemble/disassemble is implemented for uks + + + + + Get the key value from the owning entity instance. It is usually the identifier, but it might be some + other unique key, in the case of a property-ref. + + + + + Get the id value from the owning entity key, usually the same as the key, but might be some + other property, in the case of property-ref + + The collection owner key + The session from which the request is originating. + + The collection owner's id, if it can be obtained from the key; + otherwise, null is returned + + + + + Instantiate an empty instance of the "underlying" collection (not a wrapper), + but with the given anticipated size (i.e. accounting for initial capacity + and perhaps load factor). + + + The anticipated size of the instantiated collection after we are done populating it. + + A newly instantiated collection to be wrapped. + + + + Get an iterator over the element set of the collection, which may not yet be wrapped + + The collection to be iterated + The session from which the request is originating. + The iterator. + + + + Get an iterator over the element set of the collection in POCO mode + + The collection to be iterated + The iterator. + + + + + + + + + + A cancellation token that can be used to cancel the work + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This method does not populate the component parent + + + + + + + + + + + + + + Maps a Property + to a column. + + + CultureInfoType stores the culture name (not the Culture ID) of the + in the DB. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A custom type for mapping user-written classes that implement + . + + + + + + + Adapts IUserType to the generic IType interface. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Maps a property to a column that + stores date & time down to the accuracy of a second. + + + This only stores down to a second, so if you are looking for the most accurate + date and time storage your provider can give you use the + or the . This type is equivalent to the Hibernate DateTime type. + + + + + + + + + + + + + + + + + Maps a Property to a + + + + + + + + Default constructor. + + + + + Constructor for specifying a datetimeoffset with a scale. Use . + + The sql type to use for the type. + + + + Truncate a according to specified resolution. + + The value to round. + The resolution in ticks (100ns). + A rounded . + + + + + + + + + + + + + + + + When used as a version, gets seeded and incremented by querying the database's + current timestamp, rather than the application host's current timestamp. + + + + + + + + Retrieves the current timestamp in database. + + The session to use for retrieving the timestamp. + A cancellation token that can be used to cancel the work + A datetime. + + + + + + + + + + Indicates if the dialect support the adequate timestamp selection. + + The dialect to test. + if the dialect supports selecting the adequate timestamp, + otherwise. + + + + Retrieves the current timestamp in database. + + The session to use for retrieving the timestamp. + A datetime. + + + + Gets the timestamp selection query. + + The dialect for which retrieving the timestamp selection query. + A SQL query. + + + + A reference to an entity class + + + + + Converts the id contained in the to an object. + + The that contains the query results. + A string array of column names that contain the id. + The this is occurring in. + The object that this Entity will be a part of. + A cancellation token that can be used to cancel the work + + An instance of the object or if the identifer was null. + + + + + Resolves the identifier to the actual object. + + + + + Resolve an identifier or unique key value + + + + + A cancellation token that can be used to cancel the work + + + + + Load an instance by a unique key that is not the primary key. + + The name of the entity to load + The name of the property defining the unique key. + The unique key property value. + The originating session. + A cancellation token that can be used to cancel the work + The loaded entity + + + Constructs the requested entity type mapping. + The name of the associated entity. + + The property-ref name, or null if we + reference the PK of the associated entity. + + Is eager fetching enabled. + + Is unwrapping of proxies allowed for this association; unwrapping + says to return the "implementation target" of lazy proxies; typically only possible + with lazy="no-proxy". + + + + Explicitly, an entity type is an entity type + True. + + + Two entities are considered the same when their instances are the same. + One entity instance + Another entity instance + True if x == y; false otherwise. + + + + This returns the wrong class for an entity with a proxy, or for a named + entity. Theoretically it should return the proxy class, but it doesn't. +

+ The problem here is that we do not necessarily have a ref to the associated + entity persister (nor to the session factory, to look it up) which is really + needed to "do the right thing" here... +

+
+ + + Get the identifier value of an instance or proxy. +

+ Intended only for loggin purposes!!! +

+ The object from which to extract the identifier. + The entity persister + The extracted identifier. +
+ + + Converts the id contained in the to an object. + + The that contains the query results. + A string array of column names that contain the id. + The this is occurring in. + The object that this Entity will be a part of. + + An instance of the object or if the identifer was null. + + + + Retrieves the {@link Joinable} defining the associated entity. + The session factory. + The associated joinable + + + + Determine the type of either (1) the identifier if we reference the + associated entity's PK or (2) the unique key to which we refer (i.e. + the property-ref). + + The mappings... + The appropriate type. + + + + The name of the property on the associated entity to which our FK refers + + The mappings... + The appropriate property name. + + + Convenience method to locate the identifier type of the associated entity. + The mappings... + The identifier type + + + Convenience method to locate the identifier type of the associated entity. + The originating session + The identifier type + + + + Resolves the identifier to the actual object. + + + + + Resolve an identifier or unique key value + + + + + + + + The name of the associated entity. + The session factory, for resolution. + The associated entity name. + + + The name of the associated entity. + The associated entity name. + + + + When implemented by a class, gets the type of foreign key directionality + of this association. + + The of this association. + + + + Is the foreign key the primary key of the table? + + + + + Load an instance by a unique key that is not the primary key. + + The name of the entity to load + The name of the property defining the unique key. + The unique key property value. + The originating session. + The loaded entity + + + + Converts the given enum instance into a basic type. + + + + + + + + + + Maps a to a + DbType.String. + + + If your database should store the + using the named values in the enum instead of the underlying values + then subclass this . + + + All that needs to be done is to provide a default constructor that + NHibernate can use to create the specific type. For example, if + you had an enum defined as. + + + + public enum MyEnum + { + On, + Off, + Dimmed + } + + + + all that needs to be written for your enum string type is: + + + + public class MyEnumStringType : NHibernate.Type.EnumStringType + { + public MyEnumStringType() + : base( typeof( MyEnum ) ) + { + } + } + + + + The mapping would look like: + + + + ... + <property name="Status" type="MyEnumStringType, AssemblyContaining" /> + ... + + + + The TestFixture that shows the working code can be seen + in NHibernate.Test.TypesTest.EnumStringTypeFixture.cs + , NHibernate.Test.TypesTest.EnumStringClass.cs + , and NHibernate.Test.TypesTest.EnumStringClass.hbm.xml + + + + + + + + + + + A cancellation token that can be used to cancel the work + + + + + Hardcoding of 255 for the maximum length + of the Enum name that will be saved to the db. + + + 255 because that matches the default length that hbm2ddl will + use to create the column. + + + + + Initializes a new instance of . + + The of the Enum. + + + + Initializes a new instance of . + + The of the Enum. + The length of the string that can be written to the column. + + + + + + + This appends enumstring - to the beginning of the underlying + enums name so that could still be stored + using the underlying value through the + also. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + An that maps an collection + using bag semantics with an identifier to the database. + + + + + Initializes a new instance of a class for + a specific role. + + The role the persistent collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + + + + Instantiates a new for the identifier bag. + + The current for the identifier bag. + + + + + + + Wraps an in a . + + The for the collection to be a part of. + The unwrapped . + + An that wraps the non NHibernate . + + + + + + + + Instantiate an empty instance of the "underlying" collection (not a wrapper), + but with the given anticipated size (i.e. accounting for initial capacity + and perhaps load factor). + + + The anticipated size of the instantiated collection after we are done populating it. + + A newly instantiated collection to be wrapped. + + + + An that maps an collection + to the database. + + + + + Initializes a new instance of a class for + a specific role. + + The role the persistent collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + + + + Instantiates a new for the map. + + The current for the map. + + Not used. + + + + + Wraps an in a . + + The for the collection to be a part of. + The unwrapped . + + An that wraps the + non NHibernate . + + + + + Enables other Component-like types to hold collections and have cascades, etc. + + + + + Get the values of the component properties of + a component instance + + + + Get the types of the component properties + + + Get the names of the component properties + + + + Optional operation + + nullability of component properties + + + + Get the values of the component properties of + a component instance + + + + + Optional Operation + + + + + Optional operation + + + + Return a cacheable "disassembled" representation of the object. + the value to cache + the session + optional parent entity object (needed for collections) + A cancellation token that can be used to cancel the work + the disassembled, deep cloned state + + + Reconstruct the object from its cached "disassembled" state. + the disassembled state from the cache + the session + the parent entity object + A cancellation token that can be used to cancel the work + the the object + + + + Called before assembling a query result set from the query cache, to allow batch fetching + of entities missing from the second-level cache. + + + + Return a cacheable "disassembled" representation of the object. + the value to cache + the session + optional parent entity object (needed for collections) + the disassembled, deep cloned state + + + Reconstruct the object from its cached "disassembled" state. + the disassembled state from the cache + the session + the parent entity object + the the object + + + + Called before assembling a query result set from the query cache, to allow batch fetching + of entities missing from the second-level cache. + + + + + Superclass of nullable immutable types. + + + + + Initialize a new instance of the ImmutableType class using a + . + + The underlying . + + + + Gets the value indicating if this IType is mutable. + + false - an is not mutable. + + This has been "sealed" because any subclasses are expected to be immutable. If + the type is mutable then they should inherit from . + + + + + Maps a Property + to a column. + + + + + + + + + + + + + + + + + Maps a Property + to a column. + + + + + + + + + + + + + + + + + Maps a Property + to a column. + + + + + + + + + + + + + + + + + Defines a mapping from a .NET to a SQL data-type. + This interface is intended to be implemented by applications that need custom types. + + + Implementors should usually be immutable and MUST definitely be threadsafe. + + + + + When implemented by a class, should the parent be considered dirty, + given both the old and current field or element value? + + The old value + The current value + The + A cancellation token that can be used to cancel the work + true if the field is dirty + + + + When implemented by a class, should the parent be considered dirty, + given both the old and current field or element value? + + The old value + The current value + Indicates which columns are to be checked. + The + A cancellation token that can be used to cancel the work + true if the field is dirty + + + + When implemented by a class, gets an instance of the object mapped by + this IType from the . + + The that contains the values + + The names of the columns in the that contain the + value to populate the IType with. + + + + A cancellation token that can be used to cancel the work + The object mapped by this IType. + + Implementors should handle possibility of null values. + + + + + When implemented by a class, gets an instance of the object + mapped by this IType from the . + + The that contains the values + The name of the column in the that contains the + value to populate the IType with. + + + A cancellation token that can be used to cancel the work + The object mapped by this IType. + + Implementations should handle possibility of null values. + This method might be called if the IType is known to be a single-column type. + + + + + When implemented by a class, puts the value/values from the mapped + class into the . + + The to put the values into. + The object that contains the values. + The index of the to start writing the values to. + Indicates which columns are to be set. + + A cancellation token that can be used to cancel the work + + Implementors should handle possibility of null values. + A multi-column type should be written to parameters starting from . + + + + + When implemented by a class, puts the value/values from the mapped + class into the . + + + The to put the values into. + + The object that contains the values. + + The index of the to start writing the values to. + + + A cancellation token that can be used to cancel the work + + Implementors should handle possibility of null values. + A multi-column type should be written to parameters starting from . + + + + + When implemented by a class, retrieves an instance of the mapped class, + or the identifier of an entity or collection from a . + + The that contains the values. + + The names of the columns in the that contain the + value to populate the IType with. + + The session. + The parent Entity. + A cancellation token that can be used to cancel the work + An identifier or actual object mapped by this IType. + + + This is useful for 2-phase property initialization - the second phase is a call to + ResolveIdentifier() + + + Most implementors of this method will just pass the call to NullSafeGet(). + + + + + + When implemented by a class, maps identifiers to Entities or Collections. + + An identifier or value returned by Hydrate(). + The session. + The parent Entity. + A cancellation token that can be used to cancel the work + The Entity or Collection referenced by this Identifier. + + This is the second phase of 2-phase property initialization. + + + + + Given a hydrated, but unresolved value, return a value that may be used to + reconstruct property-ref associations. + + + + + During merge, replace the existing (target) value in the entity we are merging to + with a new (original) value from the detached entity we are merging. For immutable + objects, or null values, it is safe to simply return the first parameter. For + mutable objects, it is safe to return a copy of the first parameter. For objects + with component values, it might make sense to recursively replace component values. + + The value from the detached entity being merged. + The value in the managed entity. + + + + A cancellation token that can be used to cancel the work + The value to be merged. + + + + During merge, replace the existing (target) value in the entity we are merging to + with a new (original) value from the detached entity we are merging. For immutable + objects, or null values, it is safe to simply return the first parameter. For + mutable objects, it is safe to return a copy of the first parameter. For objects + with component values, it might make sense to recursively replace component values. + + The value from the detached entity being merged. + The value in the managed entity. + + + + + A cancellation token that can be used to cancel the work + The value to be merged. + + + + When implemented by a class, gets the abbreviated name of the type. + + The NHibernate type name. + + + + When implemented by a class, gets the returned + by the NullSafeGet() methods. + + + The from the .NET framework. + + + This is used to establish the class of an array of this IType. + + + + + When implemented by a class, gets the value indicating if the objects + of this IType are mutable. + + true if the objects mapped by this IType are mutable. + + With respect to the referencing object... + Entities and Collections are considered immutable because they manage their own internal state. + + + + + When implemented by a class, gets a value indicating if the implementor is castable to an . + + if this is an association. + + This does not necessarily imply that the type actually represents an association. + + + + + When implemented by a class, gets a value indicating if the implementor is a collection type. + + if this is a . + + + + When implemented by a class, gets a value indicating if the implementor is an . + + if this is an . + + If true, the implementation must be castable to . + A component type may own collections or associations and hence must provide certain extra functionality. + + + + + When implemented by a class, gets a value indicating if the implementor extends . + + if this is an . + + + + When implemented by a class, gets a value indicating if the implementation is an "any" type. + + if this an "any" type. + This is a reference to a persistent entity that is not modelled as a (foreign key) association. + + + + When implemented by a class, returns the SqlTypes for the columns mapped by this IType. + + The that uses this IType. + An array of s. + + + + When implemented by a class, returns how many columns are used to persist this type. + + The that uses this IType. + The number of columns this IType spans. + MappingException + + + + When implemented by a class, should the parent be considered dirty, + given both the old and current field or element value? + + The old value + The current value + The + true if the field is dirty + + + + When implemented by a class, should the parent be considered dirty, + given both the old and current field or element value? + + The old value + The current value + Indicates which columns are to be checked. + The + true if the field is dirty + + + + When implemented by a class, gets an instance of the object mapped by + this IType from the . + + The that contains the values + + The names of the columns in the that contain the + value to populate the IType with. + + + + The object mapped by this IType. + + Implementors should handle possibility of null values. + + + + + When implemented by a class, gets an instance of the object + mapped by this IType from the . + + The that contains the values + The name of the column in the that contains the + value to populate the IType with. + + + The object mapped by this IType. + + Implementations should handle possibility of null values. + This method might be called if the IType is known to be a single-column type. + + + + + When implemented by a class, puts the value/values from the mapped + class into the . + + The to put the values into. + The object that contains the values. + The index of the to start writing the values to. + Indicates which columns are to be set. + + + Implementors should handle possibility of null values. + A multi-column type should be written to parameters starting from . + + + + + When implemented by a class, puts the value/values from the mapped + class into the . + + + The to put the values into. + + The object that contains the values. + + The index of the to start writing the values to. + + + + Implementors should handle possibility of null values. + A multi-column type should be written to parameters starting from . + + + + + When implemented by a class, a representation of the value to be + embedded in an XML element + + The object that contains the values. + + An Xml formatted string. + + + + When implemented by a class, returns a deep copy of the persistent + state, stopping at entities and at collections. + + A Collection element or Entity field. + The session factory. + A deep copy of the object. + + + + When implemented by a class, retrieves an instance of the mapped class, + or the identifier of an entity or collection from a . + + The that contains the values. + + The names of the columns in the that contain the + value to populate the IType with. + + The session. + The parent Entity. + An identifier or actual object mapped by this IType. + + + This is useful for 2-phase property initialization - the second phase is a call to + ResolveIdentifier() + + + Most implementors of this method will just pass the call to NullSafeGet(). + + + + + + When implemented by a class, maps identifiers to Entities or Collections. + + An identifier or value returned by Hydrate(). + The session. + The parent Entity. + The Entity or Collection referenced by this Identifier. + + This is the second phase of 2-phase property initialization. + + + + + Given a hydrated, but unresolved value, return a value that may be used to + reconstruct property-ref associations. + + + + + During merge, replace the existing (target) value in the entity we are merging to + with a new (original) value from the detached entity we are merging. For immutable + objects, or null values, it is safe to simply return the first parameter. For + mutable objects, it is safe to return a copy of the first parameter. For objects + with component values, it might make sense to recursively replace component values. + + The value from the detached entity being merged. + The value in the managed entity. + + + + The value to be merged. + + + + During merge, replace the existing (target) value in the entity we are merging to + with a new (original) value from the detached entity we are merging. For immutable + objects, or null values, it is safe to simply return the first parameter. For + mutable objects, it is safe to return a copy of the first parameter. For objects + with component values, it might make sense to recursively replace component values. + + The value from the detached entity being merged. + The value in the managed entity. + + + + + The value to be merged. + + + + Compare two instances of the class mapped by this type for persistence + "equality" - equality of persistent state - taking a shortcut for + entity references. + + + + boolean + + + + When implemented by a class, compare two instances of the class mapped by this + IType for persistence "equality" - ie. Equality of persistent state. + + The left hand side object. + The right hand side object. + True if the two objects contain the same values. + + + + When implemented by a class, compare two instances of the class mapped by this + IType for persistence "equality" - ie. Equality of persistent state. + + The left hand side object. + The right hand side object. + The session factory for which the values are compared. + True if the two objects contain the same values. + + + Get a hashcode, consistent with persistence "equality" + + + + Get a hashcode, consistent with persistence "equality" + + + + + compare two instances of the type + + + + + Get the type of a semi-resolved value. + + + + Given an instance of the type, return an array of boolean, indicating + which mapped columns would be null. indicates + a non-null column, indicates a null column. + + An instance of the type. + The mapping. + + + + An that may be used to version data. + + + + + When implemented by a class, increments the version. + + The current version + The current session, if available. + A cancellation token that can be used to cancel the work + an instance of the that has been incremented. + + + + When implemented by a class, gets an initial version. + + The current session, if available. + A cancellation token that can be used to cancel the work + An instance of the type. + + + + When implemented by a class, increments the version. + + The current version + The current session, if available. + an instance of the that has been incremented. + + + + When implemented by a class, gets an initial version. + + The current session, if available. + An instance of the type. + + + + Get a comparator for the version numbers + + + + + Parse the string representation of a value to convert it to the .NET object. + + A string representation. + The value. + Notably meant for parsing unsave-value mapping attribute value. Contrary to what could + be expected due to its current name, must be a plain string, not a xml encoded + string. + + + + A many-to-one association to an entity + + + + + Hydrates the Identifier from . + + The that contains the query results. + A string array of column names to read from. + The this is occurring in. + The object that this Entity will be a part of. + A cancellation token that can be used to cancel the work + + An instantiated object that used as the identifier of the type. + + + + + Hydrates the Identifier from . + + The that contains the query results. + A string array of column names to read from. + The this is occurring in. + The object that this Entity will be a part of. + + An instantiated object that used as the identifier of the type. + + + + + Superclass for mutable nullable types. + + + + + Initialize a new instance of the MutableType class using a + . + + The underlying . + + + + Gets the value indicating if this IType is mutable. + + true - a is mutable. + + This has been "sealed" because any subclasses are expected to be mutable. If + the type is immutable then they should inherit from . + + + + + Superclass of single-column nullable types. + + + Maps the Property to a single column that is capable of storing nulls in it. If a .net Struct is + used it will be created with its uninitialized value and then on Update the uninitialized value of + the Struct will be written to the column - not . + + + + + + + This method has been "sealed" because the Types inheriting from + do not need to and should not override this method. + + + This method checks to see if value is null, if it is then the value of + is written to the . + + + If the value is not null, then the method + is called and that method is responsible for setting the value. + + + + + + + This has been sealed because no other class should override it. This + method calls for a single value. + It only takes the first name from the string[] names parameter - that is a + safe thing to do because a Nullable Type only has one field. + + + + + + + This implementation forwards the call to . + + + It has been "sealed" because the Types inheriting from + do not need to and should not override this method. All of their implementation + should be in . + + + + + + Initialize a new instance of the NullableType class using a + . + + The underlying . + This is used when the Property is mapped to a single column. + + + + When implemented by a class, put the value from the mapped + Property into to the . + + The to put the value into. + The object that contains the value. + The index of the to start writing the values to. + The session for which the operation is done. + + Implementors do not need to handle possibility of null values because this will + only be called from after + it has checked for nulls. + + + + + When implemented by a class, gets the object in the + for the Property. + + The that contains the value. + The index of the field to get the value from. + The session for which the operation is done. + An object with the value from the database. + + + + When implemented by a class, gets the object in the + for the Property. + + The that contains the value. + The name of the field to get the value from. + The session for which the operation is done. + An object with the value from the database. + + Most implementors just call the + overload of this method. + + + + + A representation of the value to be embedded in an XML element + + The object that contains the values. + + An Xml formatted string. + + + + + + + Parse the XML representation of an instance + + XML string to parse, guaranteed to be non-empty + + + + + + + This method has been "sealed" because the Types inheriting from + do not need to and should not override this method. + + + This method checks to see if value is null, if it is then the value of + is written to the . + + + If the value is not null, then the method + is called and that method is responsible for setting the value. + + + + + + + This has been sealed because no other class should override it. This + method calls for a single value. + It only takes the first name from the string[] names parameter - that is a + safe thing to do because a Nullable Type only has one field. + + + + + Extracts the values of the fields from the DataReader + + The DataReader positioned on the correct record + An array of field names. + The session for which the operation is done. + The value off the field from the DataReader + + In this class this just ends up passing the first name to the NullSafeGet method + that takes a string, not a string[]. + + I don't know why this method is in here - it doesn't look like anybody that inherits + from NullableType overrides this... + + TODO: determine if this is needed + + + + + Gets the value of the field from the . + + The positioned on the correct record. + The name of the field to get the value from. + The session for which the operation is done. + The value of the field. + + + This method checks to see if value is null, if it is then the null is returned + from this method. + + + If the value is not null, then the method + is called and that method is responsible for retrieving the value. + + + + + + + + This implementation forwards the call to . + + + It has been "sealed" because the Types inheriting from + do not need to and should not override this method. All of their implementation + should be in . + + + + + + Gets the underlying for + the column mapped by this . + + The underlying . + + This implementation should be suitable for all subclasses unless they need to + do some special things to get the value. There are no built in s + that override this Property. + + + + + + + This implementation forwards the call to . + + + It has been "sealed" because the Types inheriting from + do not need to and should not override this method because they map to a single + column. All of their implementation should be in . + + + + + + Overrides the sql type. + + The type to override. + The mapping for which to override . + The refined types. + + + + Returns the number of columns spanned by this + + A always returns 1. + + This has the hard coding of 1 in there because, by definition of this class, + a NullableType can only map to one column in a table. + + + + + Determines whether the specified is equal to this + . + + The to compare with this NullableType. + true if the SqlType and Name properties are the same. + + + + Serves as a hash function for the , + suitable for use in hashing algorithms and data structures like a hash table. + + + A hash code that is based on the 's + hash code and the 's hash code. + + + + A one-to-one association to an entity + + + + + We don't need to dirty check one-to-one because of how + assemble/disassemble is implemented and because a one-to-one + association is never dirty + + + + + PersistentEnumType + + + + + Gets an instance of the Enum + + The underlying value of an item in the Enum. + + An instance of the Enum set to the code value. + + + + + Gets the correct value for the Enum. + + The value to convert (an enum instance). + A boxed version of the code, converted to the correct type. + + This handles situations where the DataProvider returns the value of the Enum + from the db in the wrong underlying type. It uses to + convert it to the correct type. + + + + + + + + Maps an instance of a that has the + to a column. + + + + For performance reasons, the SerializableType should be used when you know that Bytes are + not going to be greater than 8,000. Implementing a custom type is recommended for larger + types. + + + The base class is because the data is stored in + a byte[]. The System.Array does not have a nice "equals" method so we must + do a custom implementation. + + + + + + + + + + + + + + + + + + + + + + + + + + A one-to-one association that maps to specific formula(s) + instead of the primary key column of the owning entity. + + + + + Maps a Property to an column + that stores the DateTime using the Ticks property. + + + This is the recommended way to "timestamp" a column, along with . + The System.DateTime.Ticks is accurate to 100-nanosecond intervals. + This type yields dates with an unspecified . On writes, it + does not perform any checks or conversions related to the kind of the date value to persist. + + + + + + + + Get the in the for the Property. + + The that contains the value. + The index of the field to get the value from. + The session for which the operation is done. + An object with the value from the database. + + + + + + + + + + + + + + + + Maps a Property to an column + This is an extra way to map a . You already have + but mapping against a . + + + + + Default constructor. + + + + + Constructor for specifying a time with a scale. Use . + + The sql type to use for the type. + + + + + + + + + + Maps a Property to an column + + + + + + + + + + + + + + + + + + + + + + + + + + Collection of convenience methods relating to operations across arrays of types... + + + + Apply the operation across a series of values. + The values + The value types + The originating session + A cancellation token that can be used to cancel the work + + + + Apply the operation across a series of values. + + The values + The value types + The originating session + The entity "owning" the values + A cancellation token that can be used to cancel the work + + + + Apply the operation across a series of values. + The values + The value types + An array indicating which values to include in the disassembled state + The originating session + The entity "owning" the values + A cancellation token that can be used to cancel the work + The disassembled state + + + + Apply the operation across a series of values. + + The source of the state + The target into which to replace the source values. + The value types + The originating session + The entity "owning" the values + Represent a cache of already replaced state + A cancellation token that can be used to cancel the work + The replaced state + + + + Apply the + operation across a series of values. + + The source of the state + The target into which to replace the source values. + The value types + The originating session + The entity "owning" the values + A map representing a cache of already replaced state + FK directionality to be applied to the replacement + A cancellation token that can be used to cancel the work + The replaced state + + + + Apply the + operation across a series of values, as long as the corresponding is an association. + + The source of the state + The target into which to replace the source values. + The value types + The originating session + The entity "owning" the values + A map representing a cache of already replaced state + FK directionality to be applied to the replacement + A cancellation token that can be used to cancel the work + The replaced state + + If the corresponding type is a component type, then apply + across the component subtypes but do not replace the component value itself. + + + + + Determine if any of the given field values are dirty, returning an array containing + indices of the dirty fields. + If it is determined that no fields are dirty, null is returned. + + The property definitions + The current state of the entity + The baseline state of the entity + Columns to be included in the dirty checking, per property + Does the entity currently hold any uninitialized property values? + The session from which the dirty check request originated. + A cancellation token that can be used to cancel the work + Array containing indices of the dirty properties, or null if no properties considered dirty. + + + + Determine if any of the given field values are modified, returning an array containing + indices of the modified fields. + If it is determined that no fields are dirty, null is returned. + + The property definitions + The current state of the entity + The baseline state of the entity + Columns to be included in the mod checking, per property + Does the entity currently hold any uninitialized property values? + The session from which the dirty check request originated. + A cancellation token that can be used to cancel the work + Array containing indices of the modified properties, or null if no properties considered modified. + + + Deep copy a series of values from one array to another + The values to copy (the source) + The value types + An array indicating which values to include in the copy + The array into which to copy the values + The originating session + + + Apply the operation across a series of values. + The values + The value types + The originating session + + + + Apply the operation across a series of values. + + The values + The value types + The originating session + The entity "owning" the values + + + + Apply the operation across a series of values. + The values + The value types + An array indicating which values to include in the disassembled state + The originating session + The entity "owning" the values + The disassembled state + + + + Apply the operation across a series of values. + + The source of the state + The target into which to replace the source values. + The value types + The originating session + The entity "owning" the values + Represent a cache of already replaced state + The replaced state + + + + Apply the + operation across a series of values. + + The source of the state + The target into which to replace the source values. + The value types + The originating session + The entity "owning" the values + A map representing a cache of already replaced state + FK directionality to be applied to the replacement + The replaced state + + + + Apply the + operation across a series of values, as long as the corresponding is an association. + + The source of the state + The target into which to replace the source values. + The value types + The originating session + The entity "owning" the values + A map representing a cache of already replaced state + FK directionality to be applied to the replacement + The replaced state + + If the corresponding type is a component type, then apply + across the component subtypes but do not replace the component value itself. + + + + + Determine if any of the given field values are dirty, returning an array containing + indices of the dirty fields. + If it is determined that no fields are dirty, null is returned. + + The property definitions + The current state of the entity + The baseline state of the entity + Columns to be included in the dirty checking, per property + Does the entity currently hold any uninitialized property values? + The session from which the dirty check request originated. + Array containing indices of the dirty properties, or null if no properties considered dirty. + + + + Determine if any of the given field values are modified, returning an array containing + indices of the modified fields. + If it is determined that no fields are dirty, null is returned. + + The property definitions + The current state of the entity + The baseline state of the entity + Columns to be included in the mod checking, per property + Does the entity currently hold any uninitialized property values? + The session from which the dirty check request originated. + Array containing indices of the modified properties, or null if no properties considered modified. + + + + Maps the Assembly Qualified Name of a to a + column. + + + + + + + + + + + + + + Initialize a new instance of the TypeType class using a + . + + The underlying . + + + + Gets the in the for the Property. + + The that contains the value. + The index of the field to get the value from. + The session for which the operation is done. + The from the database. + + Thrown when the value in the database can not be loaded as a + + + + + Gets the in the for the Property. + + The that contains the value. + The name of the field to get the value from. + The session for which the operation is done. + The from the database. + + This just calls gets the index of the name in the DbDataReader + and calls the overloaded version + (DbDataReader, Int32). + + + Thrown when the value in the database can not be loaded as a + + + + + Puts the Assembly Qualified Name of the + Property into to the . + + The to put the value into. + The that contains the value. + The index of the to start writing the value to. + The session for which the operation is done. + + This uses the method of the + object to do the work. + + + + + + + + A representation of the value to be embedded in an XML element + + The that contains the values. + + An Xml formatted string that contains the Assembly Qualified Name. + + + + Gets the that will be returned + by the NullSafeGet() methods. + + + A from the .NET framework. + + + + + + + + + + + + + + Maps a Property + to a column. + + + + + + + + + + + + + + + + + Maps a Property + to a column. + + + + + + + + + + + + + + + + + Maps a Property + to a column. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Common base class for and . + + + + + + + + Base class for enum types. + + + + + + + + The comparer culture parameter name. Value should be Current, Invariant, + Ordinal or any valid culture name. + + Default comparison is ordinal. + + + + The case sensitivity parameter name. Value should be a boolean, true meaning + case insensitive. + + Default comparison is case sensitive. + + + + The default string comparer for determining string equality and calculating hash codes. + Default is StringComparer.Ordinal. + + + + + The string comparer of this instance of string type, for determining string equality and + calculating hash codes. Set to use . + + + + + + + + + + + Determines whether the specified is equal to this + . + + The to compare with this AbstractStringType. + if the SqlType, Name and Comparer properties are the same. + + + + Serves as a hash function for the , + suitable for use in hashing algorithms and data structures like a hash table. + + + A hash code that is based on the 's + hash code, the 's hash code and the hash + code. + + + + Maps a Property + to a DbType.AnsiStringFixedLength column. + + + + + Maps a Property + to a column. + + + + + + + + Maps a System.Byte[] Property to an column that can store a BLOB. + + + This is only needed by DataProviders (SqlClient) that need to specify a Size for the + DbParameter. Most DataProvider(Oracle) don't need to set the Size so a BinaryType + would work just fine. + + + + + + + + BinaryType. + + + + + Maps a Property + to a column. + + + + + Initialize a new instance of the BooleanType + + This is used when the Property is mapped to a native boolean type. + + + + Initialize a new instance of the BooleanType class using a + . + + The underlying . + + This is used when the Property is mapped to a string column + that stores true or false as a string. + + + + + + + + Maps a Property + to a column. + + + + + + + + + + + + + + + + + + + + Maps a Property + to a DbType.StringFixedLength column. + + + + + Maps a Property to a + + + + + Default constructor. + + + + + Constructor for specifying a datetime with a scale. Use . + + The sql type to use for the type. + + + + + + + Maps a property to a column that + stores date & time down to the accuracy of the database. + + + If you are looking for the most accurate date and time storage accross databases use the + . If you are looking for the Hibernate DateTime equivalent, + use the . + + + + + Default constructor. + + + + + Constructor for specifying a datetime with a scale. Use . + + The sql type to use for the type. + + + + + + + Maps the Year, Month, and Day of a Property to a + column + + + + Default constructor + + + + + + + + + + + + + + + + + + + + + + + + + + + + Maps a Property + to a column. + + + + + + + + Maps a Property + to a column. + + + + + + + + + + + + + + Represents directionality of the foreign key constraint + + + + + A foreign key from parent to child + + + + + A foreign key from child to parent + + + + + Should we cascade at this cascade point? + + + + + An that maps an collection + to the database using bag semantics. + + + + + Initializes a new instance of a class for + a specific role. + + The role the persistent collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + + + + Instantiates a new for the bag. + + The current for the bag. + The current for the bag. + + + + + Wraps an in a . + + The for the collection to be a part of. + The unwrapped . + + An that wraps the non NHibernate . + + + + + An that maps an collection + to the database using list semantics. + + + + + Initializes a new instance of a class for + a specific role. + + The role the persistent collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + + + + Instantiates a new for the list. + + The current for the list. + The current for the list. + + + + + Wraps an in a . + + The for the collection to be a part of. + The unwrapped . + + An that wraps the non NHibernate . + + + + + An that maps a sorted collection + to the database. + + + + + Initializes a new instance of a class for + a specific role. + + The role the persistent collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + + + + An that maps an collection + to the database. + + + + + Initializes a new instance of a class for + a specific role. + + The role the persistent collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + + + + Instantiates a new for the set. + + The current for the set. + The current for the set. + + + + + Wraps an in a . + + The for the collection to be a part of. + The unwrapped . + + An that wraps the non NHibernate . + + + + + An that maps a sorted collection + to the database. + + + + + Initializes a new instance of a class for + a specific role. + + The role the persistent collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + The to use to compare + set elements. + + + + Maps a Property + to a column. + + + + + + + + + + + + + + + + + An that represents some kind of association between entities. + + + + + When implemented by a class, gets the type of foreign key directionality + of this association. + + The of this association. + + + + Is the primary key of the owning entity table + to be used in the join? + + + + + Get the name of the property in the owning entity + that provides the join key (null if the identifier) + + + + + The name of a unique property of the associated entity + that provides the join key (null if the identifier of + an entity, or key of a collection) + + + + + Get the "persister" for this association - a class or collection persister + + + + + + Get the entity name of the associated entity + + + + Do we dirty check this association, even when there are + no columns to be updated. + + + + + Get the "filtering" SQL fragment that is applied in the + SQL on clause, in addition to the usual join condition. + + + + + An IType that may be used for a discriminator column. + + + This interface contains no new methods but does require that an + that will be used in a discriminator column must implement + both the and interfaces. + + + + + An that may be used as an identifier. + + + + + Parse the string representation of a value to convert it to the .NET object. + + A string representation. + The string converted to the object. + + This method needs to be able to handle any string. It should not just + call System.Type.Parse without verifying that it is a parsable value + for the System.Type. + Notably meant for parsing discriminator-value or unsaved-value mapping attribute value. + Contrary to what could be expected due to its current name, must be a plain string, + not n xml encoded string. + + + + + An that may appear as an SQL literal + + + + + When implemented by a class, return a representation + of the value, suitable for embedding in an SQL statement + + The object to convert to a string for the SQL statement. + + A string that contains a well formed SQL Statement. + + + + Default constructor. + + + + + Constructor for specifying a datetime with a scale. Use . + + The sql type to use for the type. + + + + + + + + + + + + + + + + Superclass of types. + + + + + Initialize a new instance of the PrimitiveType class using a . + + The underlying . + + + + When implemented by a class, return a representation + of the value, suitable for embedding in an SQL statement + + The object to convert to a string for the SQL statement. + + A string that containts a well formed SQL Statement. + + + + + + + A representation of the value to be embedded in an XML element + + The object that contains the values. + + An Xml formatted string. + + This just calls so if there is + a possibility of this PrimitiveType having any characters + that need to be encoded then this method should be overridden. + + + + + Maps a Property + to a column. + + + + + + + + + + + + + + Thrown when a property cannot be serialized/deserialized + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Maps a Property to an + column. + + + Verify through your database's documentation if there is a column type that + matches up with the capabilities of + + + + + + + + + + + Maps a Property to an + column that can store a CLOB. + + + This is only needed by DataProviders (SqlClient) that need to specify a Size for the + DbParameter. Most DataProvider(Oralce) don't need to set the Size so a StringType + would work just fine. + + + + + + + + + + + + + + + + + Maps a to a column. + + + + + This is almost the exact same type as the . + + + + The value stored in the database depends on what your data provider is capable + of storing. So there is a possibility that the DateTime you save will not be + the same DateTime you get back when you check because + they will have their milliseconds off. + + + For example - SQL Server 2000 is only accurate to 3.33 milliseconds. So if + NHibernate writes a value of 01/01/98 23:59:59.995 to the Prepared Command, MsSql + will store it as 1998-01-01 23:59:59.997. + + + Please review the documentation of your Database server. + + + If you are looking for the most accurate date and time storage accross databases use the + . + + + + + + + + + + + + Retrieve the string representation of the timestamp object. This is in the following format: + + 2011-01-27T14:50:59.6220000Z + + + + + + Maps a Property to an DateTime column that only stores the + Hours, Minutes, and Seconds of the DateTime as significant. + Also you have for handling, the NHibernate Type , + the which maps to a . + + + + This defaults the Date to "1753-01-01" - that should not matter because + using this Type indicates that you don't care about the Date portion of the DateTime. + + + A more appropriate choice to store the duration/time is the . + The underlying tends to be handled differently by different + DataProviders. + + + + + + Default constructor. + + + + + Constructor for specifying a time with a scale. Use . + + The sql type to use for the type. + + + + + + + + + + Maps a to a 1 char column + that stores a 'T'/'F' to indicate true/false. + + + If you are using schema-export to generate your tables then you need + to set the column attributes: length=1 or sql-type="char(1)". + + This needs to be done because in Java's JDBC there is a type for CHAR and + in ADO.NET there is not one specifically for char, so you need to tell schema + export to create a char(1) column. + + + + + + + + + + + + + + + + + Used internally to obtain instances of IType. + + + Applications should use static methods and constants on NHibernate.NHibernateUtil if the default + IType is good enough. For example, the TypeFactory should only be used when the String needs + to have a length of 300 instead of 255. At this point NHibernateUtil.String does not get you the + correct IType. Instead use TypeFactory.GetString(300) and keep a local variable that holds + a reference to the IType. + + + + + Defines which NHibernate type should be chosen by default for handling a given .Net type. + This must be done before any operation on NHibernate, including building its + and building session factory. Otherwise the behavior will be undefined. + + The .Net type. + The NHibernate type. + The additional aliases to map to the type. Use if none. + + + + + + + Register other Default .NET type + + + These type will be used, as default, even when the "type" attribute was NOT specified in the mapping + + + + + Register other NO Default .NET type + + + These type will be used only when the "type" attribute was is specified in the mapping. + These are in here because needed to NO override default CLR types and be available in mappings + + + + + Gets the classification of the Type based on the string. + + The name of the Type to get the classification for. + The Type of Classification + + This parses through the string and makes the assumption that no class + name and no assembly name will contain the "(". + + If it finds + the "(" and then finds a "," afterwards then it is a + TypeClassification.PrecisionScale. + + + If it finds the "(" + and doesn't find a "," afterwards, then it is a + TypeClassification.Length. + + + If it doesn't find the "(" then it assumes that it is a + TypeClassification.Plain. + + + + + + Given the name of a Hibernate type such as Decimal, Decimal(19,0) + , Int32, or even NHibernate.Type.DecimalType, NHibernate.Type.DecimalType(19,0), + NHibernate.Type.Int32Type, then return an instance of NHibernate.Type.IType + + The name of the type. + The instance of the IType that the string represents. + + This method will return null if the name is not found in the basicNameMap. + + + + + Given the name of a Hibernate type such as Decimal, Decimal(19,0), + Int32, or even NHibernate.Type.DecimalType, NHibernate.Type.DecimalType(19,0), + NHibernate.Type.Int32Type, then return an instance of NHibernate.Type.IType + + The name of the type. + The parameters for the type, if any. + The instance of the IType that the string represents. + + This method will return null if the name is not found in the basicNameMap. + + + + + Uses heuristics to deduce a NHibernate type given a string naming the + type. + + + An instance of NHibernate.Type.IType + + When looking for the NHibernate type it will look in the cache of the Basic types first. + If it doesn't find it in the cache then it uses the typeName to get a reference to the + Class (Type in .NET). Once we get the reference to the .NET class we check to see if it + implements IType, ICompositeUserType, IUserType, ILifecycle (Association), or + IPersistentEnum. If none of those are implemented then we will serialize the Type to the + database using NHibernate.Type.SerializableType(typeName) + + + + + Uses heuristics to deduce a NHibernate type given a string naming the type. + + the type name + parameters for the type + An instance of NHibernate.Type.IType + + + + Uses heuristics to deduce a NHibernate type given a string naming the type. + + the type name + parameters for the type + optionally, the size of the type + + + + + Get the current default NHibernate type for a .Net type. + + The .Net type for which to get the corresponding default NHibernate type. + The current default NHibernate type for a .Net type if any, otherwise . + + + + Gets the BinaryType with the specified length. + + The length of the data to store in the database. + A BinaryType + + In addition to returning the BinaryType it will also ensure that it has + been added to the basicNameMap with the keys Byte[](length) and + NHibernate.Type.BinaryType(length). + + + + + Gets the SerializableType for the specified Type + + The Type that will be Serialized to the database. + A SerializableType + + + In addition to returning the SerializableType it will also ensure that it has + been added to the basicNameMap with the keys Type.FullName (the result + of IType.Name and Type.AssemblyQualifiedName. This is different + from the other items put in the basicNameMap because it is uses the AQN and the + FQN as opposed to the short name used in the maps and the FQN. + + + + + + Gets a with desired fractional seconds precision. + + The fractional seconds precision. + The NHibernate type. + + + + Gets a with desired fractional seconds precision. + + The fractional seconds precision. + The NHibernate type. + + + + Gets a with desired fractional seconds precision. + + The fractional seconds precision. + The NHibernate type. + + + + Gets a with desired fractional seconds precision. + + The fractional seconds precision. + The NHibernate type. + + + + Gets a with desired fractional seconds precision. + + The fractional seconds precision. + The NHibernate type. + + + + Gets a with desired fractional seconds precision. + + The fractional seconds precision. + The NHibernate type. + + + + Gets a with desired fractional seconds precision. + + The fractional seconds precision. + The NHibernate type. + + + + A one-to-one association type for the given class and cascade style. + + + + + A many-to-one association type for the given class and cascade style. + + + + + + + A many-to-one association type for the given class and cascade style. + + + + + A many-to-one association type for the given class and cascade style. + + + + + Default constructor. + + + + + Constructor for specifying a datetime with a scale. Use . + + The sql type to use for the type. + + + + + + + + + + + + + + + + When used as a version, gets seeded and incremented by querying the database's + current UTC timestamp, rather than the application host's current timestamp. + + + + + + + + + + + Maps a Property to an column + that stores the DateTime using the Ticks property. On read, yields an UTC date-time. On + write, the DateTime must already be in UTC. + + + This is the recommended way to "timestamp" a column, along with . + The System.DateTime.Ticks is accurate to 100-nanosecond intervals. + + + + + + + + + + + Maps a to a 1 char column + that stores a 'Y'/'N' to indicate true/false. + + + If you are using schema-export to generate your tables then you need + to set the column attributes: length=1 or sql-type="char(1)". + + This needs to be done because in Java's JDBC there is a type for CHAR and + in ADO.NET there is not one specifically for char, so you need to tell schema + export to create a char(1) column. + + + + + + + + + + + + + + + + + Emits IL to unbox a value type and if null, create a new instance of the value type. + + + This does not work if the value type doesn't have a default constructor - we delegate + that to the ISetter. + + + + + Thrown if NHibernate can't instantiate the type. + + + + + Represents optimized entity property access. + + + + + The specific factory for this provider capable of + generating run-time proxies for lazy-loading purposes. + + + + + Retrieve the delegate for this provider + capable of generating reflection optimization components. + + The class to be reflected upon. + All property getters to be accessed via reflection. + All property setters to be accessed via reflection. + The reflection optimization delegate. + + + + NHibernate's object instantiator. + + + For entities and its implementations. + + + + + Instantiator of NHibernate's collections default types. + + + + + Type factory for collections types. + + + + + Creates a new for an . + + The role the collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + The to use to create the array. + + An for the specified role. + + + + + Creates a new for an + with bag semantics. + + The type of elements in the list. + The role the collection is in. + + The name of the property in the owner object containing the collection ID, + or if it is the primary key. + + + A for the specified role. + + + + + Creates a new for an + with list + semantics. + + The type of elements in the list. + The role the collection is in. + + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + + + A for the specified role. + + + + + Creates a new for an + with identifier + bag semantics. + + The type of elements in the list. + The role the collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + + + A for the specified role. + + + + + Creates a new for an . + + The type of elements in the collection. + The role the collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + A for the specified role. + + + + Creates a new for a sorted . + + The type of elements in the collection. + The role the collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + The to use for the set. + A for the specified role. + + + + Creates a new for an ordered . + + The type of elements in the collection. + The role the collection is in. + + The name of the property in the owner object containing the collection ID, + or if it is the primary key. + + A for the specified role. + + + + Creates a new for an + . + + The type of keys in the dictionary. + The type of values in the dictionary. + The role the collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + + + A for the specified role. + + + + + Represents optimized entity instantiation. + + + + + Perform instantiation of an instance of the underlying class. + + The new instance. + + + + Interface for instantiating NHibernate dependencies. + + + + + Creates an instance of the specified type. + + The type of object to create. + A reference to the created object. + + + + Creates an instance of the specified type. + + The type of object to create. + true if a public or nonpublic default constructor can match; false if only a public default constructor can match. + A reference to the created object. + + + + Creates an instance of the specified type using the constructor + that best matches the specified parameters. + + The type of object to create. + An array of constructor arguments. + A reference to the created object. + + + + An interface for factories of proxy factory instances. + + + Used to abstract from the tupizer. + + + + + Build a proxy factory specifically for handling runtime + lazy loading. + + The lazy-load proxy factory. + + + + Represents reflection optimization for a particular class. + + + + + Factory that generate object based on IReflectionOptimizer needed to replace the use + of reflection. + + + Used in and + + + + + + Generate the IReflectionOptimizer object + + The target class + Array of setters + Array of getters + if the generation fails + + + + Class constructor. + + + + + Generates a dynamic method which creates a new instance of + when invoked. + + + + + Generates a dynamic method on the given type. + + + + + Generates a dynamic method on the given type. + + + + + + A implementation that returns + , disabling reflection optimization. + + + + + Controls how the session interacts with the second-level + cache and query cache. + + + + + The session will never interact with the cache, except to invalidate + cache items when updates occur + + + + + The session will never read items from the cache, but will add items + to the cache as it reads them from the database. + + + + + The session may read items from the cache, but will not add items, + except to invalidate items when updates occur + + + + The session may read items from the cache, and add items to the cache + + + + The session will never read items from the cache, but will add items + to the cache as it reads them from the database. In this mode, the + effect of cache.use_minimal_puts is bypassed, in + order to force a cache refresh + + + + + + + + Initializes a new instance of the class. + + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Extracts the names of classes mapped in a given file, + and the names of the classes they extend. + + + + + Holds information about mapped classes found in the hbm.xml files. + + + + + Returns a collection of containing + information about all classes in this stream. + + A validated representing + a mapping file. + + + + Allows the application to specify properties and mapping documents to be used when creating + a . + + + + Usually an application will create a single , build a single instance + of , and then instantiate objects in threads + servicing client requests. + + + The is meant only as an initialization-time object. + is immutable and does not retain any association back to the + + + + + Default name for hibernate configuration file. + + + + Clear the internal state of the object. + + + + + Create a new Configuration object. + + + + + The class mappings + + + + + The collection mappings + + + + + The table mappings + + + + + Get the mapping for a particular class + + + + Get the mapping for a particular entity + An entity name. + the entity mapping information + + + + Get the mapping for a particular collection role + + a collection role + + + + + Read mappings from a particular XML file. This method is equivalent + to . + + + + + + + Read mappings from a particular XML file. + + a path to a file + This configuration object. + + + + Read mappings from a . This method is equivalent to + . + + an XML string + The name to use in error reporting. May be . + This configuration object. + + + + Read mappings from a . + + an XML string + This configuration object. + + + + Read mappings from a URL. + + a URL + This configuration object. + + + + Read mappings from a URL. + + a to read the mappings from. + This configuration object. + + + + Read mappings from an . + + A loaded that contains the mappings. + The name of the document, for error reporting purposes. + This configuration object. + + + + Takes the validated XmlDocument and has the Binder do its work of + creating Mapping objects from the Mapping Xml. + + The NamedXmlDocument that contains the validated mapping XML file. + + + + Add mapping data using deserialized class. + + Mapping metadata. + XML file's name where available; otherwise null. + + + + Create a new to add classes and collection + mappings to. + + + + + Read mappings from a . + + The stream containing XML + This Configuration object. + + The passed in through the parameter + is not guaranteed to be cleaned up by this method. It is the caller's responsiblity to + ensure that is properly handled when this method + completes. + + + + + Read mappings from a . + + The stream containing XML + The name of the stream to use in error reporting. May be . + This Configuration object. + + The passed in through the parameter + is not guaranteed to be cleaned up by this method. It is the caller's responsiblity to + ensure that is properly handled when this method + completes. + + + + + Adds the mappings in the resource of the assembly. + + The path to the resource file in the assembly. + The assembly that contains the resource file. + This configuration object. + + + + Adds the mappings from embedded resources of the assembly. + + Paths to the resource files in the assembly. + The assembly that contains the resource files. + This configuration object. + + + + Read a mapping from an embedded resource, using a convention. + + The type to map. + This configuration object. + + The convention is for class Foo.Bar.Foo to be mapped by + the resource named Foo.Bar.Foo.hbm.xml, embedded in + the class' assembly. If the mappings and classes are defined + in different assemblies or don't follow the naming convention, + this method cannot be used. + + + + + Adds all of the assembly's embedded resources whose names end with .hbm.xml. + + The name of the assembly to load. + This configuration object. + + The assembly must be loadable using . If this + condition is not satisfied, load the assembly manually and call + instead. + + + + + Adds all of the assembly's embedded resources whose names end with .hbm.xml. + + The assembly. + This configuration object. + + + + Read all mapping documents from a directory tree. Assume that any + file named *.hbm.xml is a mapping document. + + a directory + + + + Generate DDL for dropping tables + + + + + + Generate DDL for creating tables + + + + + + Call this to ensure the mappings are fully compiled/built. Usefull to ensure getting + access to all information in the metamodel when calling e.g. getClassMappings(). + + + + + This method may be called many times!! + + + + + The named queries + + + + + Retrieve the user-supplied delegate to handle non-existent entity scenarios. + + + Specify a user-supplied delegate to be used to handle scenarios where an entity could not be + located by specified id. This is mainly intended for EJB3 implementations to be able to + control how proxy initialization errors should be handled... + + + + + Instantiate a new , using the properties and mappings in this + configuration. The will be immutable, so changes made to the + configuration after building the will not affect it. + + An instance. + + + + Gets or sets the to use. + + The to use. + + + + Gets or sets the that contains the configuration + properties and their values. + + + The that contains the configuration + properties and their values. + + + + + Returns the set of properties computed from the default properties in the dialect combined with the other properties in the configuration. + + + + + + Set the default assembly to use for the mappings added to the configuration + afterwards. + + The default assembly name. + This configuration instance. + + This setting can be overridden for a mapping file by setting default-assembly + attribute of <hibernate-mapping> element. + + + + + Set the default namespace to use for the mappings added to the configuration + afterwards. + + The default namespace. + This configuration instance. + + This setting can be overridden for a mapping file by setting default-namespace + attribute of <hibernate-mapping> element. + + + + + Sets the default interceptor for use by all sessions. + + The default interceptor. + This configuration instance. + + + + Specify a completely new set of properties + + + + + Adds an of configuration properties. The + Key is the name of the Property and the Value is the + value of the Property. + + An of configuration properties. + + This object. + + + + + Sets the value of the configuration property. + + The name of the property. + The value of the property. + + This configuration object. + + + + + Gets the value of the configuration property. + + The name of the property. + The configured value of the property, or if the property was not specified. + + + + Configure NHibernate using the <hibernate-configuration> section + from the application config file, if found, or the file hibernate.cfg.xml if the + <hibernate-configuration> section not include the session-factory configuration. + + A configuration object initialized with the file. + + To configure NHibernate explicitly using hibernate.cfg.xml, appling merge/override + of the application configuration file, use this code: + + configuration.Configure("path/to/hibernate.cfg.xml"); + + + + + + Configure NHibernate using the file specified. + + The location of the XML file to use to configure NHibernate. + A Configuration object initialized with the file. + + Calling Configure(string) will override/merge the values set in app.config or web.config + + + + + Configure NHibernate using a resource contained in an Assembly. + + The that contains the resource. + The name of the manifest resource being requested. + A Configuration object initialized from the manifest resource. + + Calling Configure(Assembly, string) will overwrite the values set in app.config or web.config + + + + + Configure NHibernate using the specified XmlReader. + + The that contains the Xml to configure NHibernate. + A Configuration object initialized with the file. + + Calling Configure(XmlReader) will overwrite the values set in app.config or web.config + + + + + Set up a cache for an entity class + + + + + Set up a cache for a collection role + + + + + Get the query language imports (entityName/className -> AssemblyQualifiedName) + + + + + Create an object-oriented view of the configuration properties + + A object initialized from the settings properties. + + + + The named SQL queries + + + + + Naming strategy for tables and columns + + + + + Set a custom naming strategy + + the NamingStrategy to set + + + + + Load and validate the mappings in the against + the nhibernate-mapping-2.2 schema, without adding them to the configuration. + + + This method is made public to be usable from the unit tests. It is not intended + to be called by end users. + + The XmlReader that contains the mapping. + The name of the document, for error reporting purposes. + NamedXmlDocument containing the validated XmlDocument built from the XmlReader. + + + + Adds the Mappings in the after validating it + against the nhibernate-mapping-2.2 schema. + + The XmlReader that contains the mapping. + This Configuration object. + + + + Adds the Mappings in the after validating it + against the nhibernate-mapping-2.2 schema. + + The XmlReader that contains the mapping. + The name of the document to use for error reporting. May be . + This Configuration object. + + + + Set or clear listener for a given . + + The . + The array of AssemblyQualifiedName of each listener for . + + must implements the interface related with . + All listeners of the given will be cleared if the + is null or empty. + + + when an element of have an invalid value or cant be instantiated. + + + + + Set or clear listener for a given . + + The . + The listener for or null to clear. + must implements the interface related with . + + + + + Set or clear listeners for a given . + + The . + The listener for or null to clear. + Listeners of must implements one of the interface of event listenesr. + + + + + Append the listeners to the end of the currently configured + listeners + + + + + Generate DDL for altering tables + + + + + + Returns the default catalog, quoted converted if needed. + + The instance of dialect to use + The default catalog, with back-tilt quote converted if any. + + + + Returns the default catalog, quoted converted if needed. + + The instance of dialect to use + The default catalog, with back-tilt quote converted if any. + + + + Add a type-definition for mappings. + + The persistent type. + The where add the type-definition. + The custom configuration action. + The . + + + + + Depending on where you will use the type-definition in the mapping the + can be : + + + + + + + + + + + + + + + + + + + + + Helper to parse hibernate-configuration XmlNode. + + + + + The XML node name for hibernate configuration section in the App.config/Web.config and + for the hibernate.cfg.xml . + + + + The XML Namespace for the nhibernate-configuration + + + XPath expression for bytecode-provider property. + + + XPath expression for objects-factory property. + + + XPath expression for reflection-optimizer property. + + + XPath expression for session-factory whole node. + + + XPath expression for session-factory.property nodes + + + XPath expression for session-factory.mapping nodes + + + XPath expression for session-factory.class-cache nodes + + + XPath expression for session-factory.collection-cache nodes + + + XPath expression for session-factory.event nodes + + + XPath expression for session-factory.listener nodes + + + + Convert a string to . + + The string that represent . + + The converted to . + + If the values is invalid. + + See for allowed values. + + + + + Convert a string to . + + The string that represent . + + The converted to . + + If the values is invalid. + + See for allowed values. + + + + + Values for class-cache include. + + Not implemented in Cache. + + + Xml value: all + + + Xml value: non-lazy + + + + Configuration parsed values for a class-cache XML node. + + + + + Initializes a new instance of the class. + + The class full name. + Cache strategy. + When is null or empty. + + + + Initializes a new instance of the class. + + The class full name. + Cache strategy. + Values for class-cache include. + When is null or empty. + + + + Initializes a new instance of the class. + + The class full name. + Cache strategy. + The cache region. + When is null or empty. + + + + Initializes a new instance of the class. + + The class full name. + Cache strategy. + Values for class-cache include. + The cache region. + When is null or empty. + + + + The class full name. + + + + + The cache region. + + If null or empty the is used during configuration. + + + + Cache strategy. + + + + + class-cache include. + + + Not implemented in Cache. + Default value . + + + + + Configuration parsed values for a collection-cache XML node. + + + + + Initializes a new instance of the class. + + The cache role. + Cache strategy. + When is null or empty. + + + + Initializes a new instance of the class. + + The cache role. + Cache strategy. + The cache region. + When is null or empty. + + + + The role. + + + + + The cache region. + + If null or empty the is used during configuration. + + + + Cache strategy. + + + + + Configuration parsed values for a event XML node. + + + + + Initializes a new instance of the class. + + The listener. + The type. + + + + The default type of listeners. + + + + + Listeners for this event. + + + + + Values for bytecode-provider system property. + + + + Xml value: lcg + + + Xml value: null + + + + Configuration parsed values for hibernate-configuration section. + + + + + Initializes a new instance of the class. + + The XML reader to parse. + + The nhibernate-configuration.xsd is applied to the XML. + + When nhibernate-configuration.xsd can't be applied. + + + + Value for bytecode-provider system property. + + Default value . + + + + Value for objects-factory system property. + + Default value . + + + + Value for reflection-optimizer system property. + + Default value true. + + + + The if the session-factory exists in hibernate-configuration; + Otherwise null. + + + + + Configuration parsed values for a listener XML node + + + + + Initializes a new instance of the class. + + The class full name. + When is null or empty. + + + + Initializes a new instance of the class. + + The class full name. + The listener type. + When is null or empty. + + + + The class full name. + + + + + The listener type. + + Default value mean that the value is ignored. + + + + Configuration parsed values for a mapping XML node + + + There are 3 possible combinations of mapping attributes + 1 - resource and assembly: NHibernate will read the mapping resource from the specified assembly + 2 - file only: NHibernate will read the mapping from the file. + 3 - assembly only: NHibernate will find all the resources ending in hbm.xml from the assembly. + + + + + Initializes a new instance of the class. + + Mapped file. + When is null or empty. + + + + Initializes a new instance of the class. + + The assembly name. + The mapped embedded resource. + When is null or empty. + + + + Configuration parsed values for a session-factory XML node. + + + + + Initializes a new instance of the class. + + The session factory name. Null or empty string are allowed. + + + + Summary description for ConfigurationSectionHandler. + + + + + The default + + See for a better alternative + + + + The singleton instance + + + + + Return the unqualified class name + + + + + + + Return the unqualified property name + + + + + + + Return the argument + + + + + + + Return the argument + + + + + + + Return the unqualified property name + + + + + + + + Values for class-cache and collection-cache strategy. + + + + Xml value: read-only + + + Xml value: read-write + + + Xml value: nonstrict-read-write + + + Xml value: transactional + + + + Helper to parse to and from XML string value. + + + + + Convert a in its xml expected value. + + The to convert. + The . + + + + Convert a string to . + + The string that represent . + + The converted to . + + If the values is invalid. + + See for allowed values. + + + + + Provides access to configuration information. + + + NHibernate has two property scopes: + + + Factory-level properties may be passed to the when it is + instantiated. Each instance might have different property values. If no properties are + specified, the factory gets them from Environment + + + System-level properties are shared by all factory instances and are always determined + by the properties + + + In NHibernate, <hibernate-configuration> section in the application configuration file + corresponds to Java system-level properties; <session-factory> + section is the session-factory-level configuration. + + It is possible to use the application configuration file (App.config) together with the NHibernate + configuration file (hibernate.cfg.xml) at the same time. + Properties in hibernate.cfg.xml override/merge properties in application configuration file where same + property is found. For others configuration a merge is applied. + + + + + NHibernate version (informational). + + + + + Used to find the .Net 2.0 named connection string + + + + A default database schema (owner) name to use for unqualified tablenames + + + A default database catalog name to use for unqualified tablenames + + + Implementation of NH-3619 - Make default value of FlushMode configurable + + + + When using an enhanced id generator and pooled optimizers (), + prefer interpreting the database value as the lower (lo) boundary. The default is to interpret it as the high boundary. + + + + Enable formatting of SQL logged to the console + + + + Timeout duration in milliseconds for the system transaction completion lock. + When a system transaction completes, it may have its completion events running on concurrent threads, + after scope disposal. This occurs when the transaction is distributed. + This notably concerns . + NHibernate protects the session from being concurrently used by the code following the scope disposal + with a lock. To prevent any application freeze, this lock has a default timeout of five seconds. If the + application appears to require longer (!) running transaction completion events, this setting allows to + raise this timeout. -1 disables the timeout. + + + + + When a system transaction is being prepared, is using connection during this process enabled? + Default is , for supporting with transaction factories + supporting system transactions. But this requires enlisting additional connections, retaining disposed + sessions and their connections till transaction end, and may trigger undesired transaction promotions to + distributed. Set to for disabling using connections from system + transaction preparation, while still benefiting from on querying. + + + + Should named queries be checked during startup (the default is enabled). + Mainly intended for test environments. + + + Enable statistics collection + + + + The classname of the HQL query parser factory. + + + + + The class name of the LINQ query provider class, implementing . + + + + + Set the default timeout in seconds for ADO.NET queries. + + + + + Set the used to instantiate NHibernate's objects. + + + + Enable ordering of insert statements for the purpose of more efficient batching. + + + Enable ordering of update statements for the purpose of more efficient batching. + + + + Set the default length used in casting when the target type is length bound and + does not specify it. 4000 by default, automatically trimmed down according to dialect type registration. + + + + + Set the default precision used in casting when the target type is decimal and + does not specify it. 29 by default, automatically trimmed down according to dialect type registration. + + + + + Set the default scale used in casting when the target type is decimal and + does not specify it. 10 by default, automatically trimmed down according to dialect type registration. + + + + + This may need to be set to 3 if you are using the OdbcDriver with MS SQL Server 2008+. + + + + + Disable switching built-in NHibernate date-time types from DbType.DateTime to DbType.DateTime2 + for dialects supporting datetime2. + + + + + Oracle has a dual Unicode support model. + Either the whole database use an Unicode encoding, and then all string types + will be Unicode. In such case, Unicode strings should be mapped to non N prefixed + types, such as Varchar2. This is the default. + Or N prefixed types such as NVarchar2 are to be used for Unicode strings. + + + See https://docs.oracle.com/cd/B19306_01/server.102/b14225/ch6unicode.htm#CACHCAHF + https://docs.oracle.com/database/121/ODPNT/featOraCommand.htm#i1007557 + This setting applies only to Oracle dialects and ODP.Net managed or unmanaged driver. + + + + + + Firebird with FirebirdSql.Data.FirebirdClient may be unable to determine the type + of parameters in many circumstances, unless they are explicitly casted in the SQL + query. To avoid this trouble, the NHibernate FirebirdClientDriver parses SQL + commands for detecting parameters in them and adding an explicit SQL cast around + parameters which may trigger the issue. + + + For disabling this behavior, set this setting to true. + + + + + + Set whether tracking the session id or not. When , each session + will have an unique that can be retrieved by , + otherwise will always be . Session id + is used for logging purpose that can be also retrieved in a static context by + , where the current session id is stored, + when tracking is enabled. + In case the current session id won't be used, it is recommended to disable it, in order to increase performance. + Default is . + + + + + Issue warnings to user when any obsolete property names are used. + + + + + + + Gets a copy of the configuration found in <hibernate-configuration> section + of app.config/web.config. + + + This is the replacement for hibernate.properties + + + + + The bytecode provider to use. + + + This property is read from the <hibernate-configuration> section + of the application configuration file by default. Since it is not + always convenient to configure NHibernate through the application + configuration file, it is also possible to set the property value + manually. This should only be done before a configuration object + is created, otherwise the change may not take effect. + + + + + NHibernate's object instantiator. + + + This property is read from the <hibernate-configuration> section + of the application configuration file by default. Since it is not + always convenient to configure NHibernate through the application + configuration file, it is also possible to set the property value + manually. + This should only be set before a configuration object + is created, otherwise the change may not take effect. + For entities see and its implementations. + + + + + Whether to enable the use of reflection optimizer + + + This property is read from the <hibernate-configuration> section + of the application configuration file by default. Since it is not + always convenient to configure NHibernate through the application + configuration file, it is also possible to set the property value + manually. This should only be done before a configuration object + is created, otherwise the change may not take effect. + + + + + Represents a mapping queued for delayed processing to await + processing of an extends entity upon which it depends. + + + + + An exception that occurs at configuration time, rather than runtime, as a result of + something screwy in the hibernate.cfg.xml. + + + + + Initializes a new instance of the class. + + Default message is used. + + + + Initializes a new instance of the class. + + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Summary description for ImprovedNamingStrategy. + + + + + The singleton instance + + + + + Return the unqualified class name, mixed case converted to underscores + + + + + + + Return the full property path with underscore separators, mixed case converted to underscores + + + + + + + Convert mixed case to underscores + + + + + + + Convert mixed case to underscores + + + + + + + Return the full property path prefixed by the unqualified class name, with underscore separators, mixed case converted to underscores + + + + + + + + A set of rules for determining the physical column and table names given the information in the mapping + document. May be used to implement project-scoped naming standards for database objects. + + + + + Return a table name for an entity class + + the fully-qualified class name + a table name + + + + Return a column name for a property path expression + + a property path + a column name + + + + Alter the table name given in the mapping document + + a table name + a table name + + + + Alter the column name given in the mapping document + + a column name + a column name + + + + Return a table name for a collection + + the fully-qualified name of the owning entity class + a property path + a table name + + + + Return the logical column name used to refer to a column in the metadata + (like index, unique constraints etc) + A full bijection is required between logicalNames and physical ones + logicalName have to be case insensitively unique for a given table + + given column name if any + property name of this column + + + + The session factory name. + + + + + Session factory properties bag. + + + + + Session factory mapping configuration. + + + + + Session factory class-cache configurations. + + + + + Session factory collection-cache configurations. + + + + + Session factory event configurations. + + + + + Session factory listener configurations. + + + + + Maximum depth of outer join fetching + + + 0 (zero) disable the usage of OuterJoinFetching + + + + + Define and configure the dialect to use. + + The dialect implementation inherited from . + The fluent configuration itself. + + + + Set the default timeout in seconds for ADO.NET queries. + + + + + Set the SessionFactory mnemonic name. + + The mnemonic name. + The fluent configuration itself. + + The SessionFactory mnemonic name can be used as a surrogate key in a multi-DB application. + + + + + DataBase integration configuration. + + + + + Cache configuration. + + + + + The timeout in seconds for the underlying ADO.NET query. + + + + + Properties of TypeDef configuration. + + + + + + The key to use the type-definition inside not strongly typed mappings (XML mapping). + + + + + An which public properties are used as + type-definition pareneters or null where type-definition does not need parameters or you want use default values. + + + + As an anonimous object can be used: + + configure.TypeDefinition<TableHiLoGenerator>(c=> + { + c.Alias = "HighLow"; + c.Properties = new {max_lo = 99}; + }); + + + + + + + A collection of mappings from classes and collections to relational database tables. + + Represents a single <hibernate-mapping> element. + + + + Binding table between the logical column name and the name out of the naming strategy + for each table. + According that when the column name is not set, the property name is considered as such + This means that while theoretically possible through the naming strategy contract, it is + forbidden to have 2 real columns having the same logical name + + + + + Binding between logical table name and physical one (ie after the naming strategy has been applied) + + + + + + + + + + + + + + + + + + + + + + The default namespace for persistent classes + + + + + The default assembly for persistent classes + + + + + Adds an import to allow for the full class name Namespace.Entity (AssemblyQualifiedName) + to be referenced as Entity or some other name in HQL. + + The name of the type that is being renamed. + The new name to use in HQL for the type. + Thrown when the rename already identifies another type. + + + + + + + + + + Gets or sets a boolean indicating if the Fully Qualified Type name should + automatically have an import added as the class name. + + if the class name should be used as an import. + + Auto-import is used to shorten the string used to refer to types to just their + unqualified name. So if the type MyAssembly.MyNamespace.MyClass, MyAssembly has + auto-import="false" then all use of it in HQL would need to be the fully qualified + version MyAssembly.MyNamespace.MyClass. If auto-import="true", the type could + be referred to in HQL as just MyClass. + + + + + Responsible for checking that a resource name matches the default pattern of "*.hbm.xml". This is the + default filter for . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Columns and Formulas, in declared order + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Columns and Formulas, in declared order + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Columns and Formulas, in declared order + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Columns and Formulas, in declared order + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Columns and Formulas, in declared order + + + + + + + + + + + + + + + + + + + + + + + + + + Columns and Formulas, in declared order + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A base class for HBM schema classes that provides helper methods. + + + + Responsible for determining whether an embedded resource should be parsed for HBM XML data while + iterating through an . + + + + + The relation of the element of the collection. + + + Can be one of: HbmCompositeElement, HbmElement, HbmManyToAny, HbmManyToMany, HbmOneToMany... + according to the type of the collection. + + + + + Implemented by any mapping elemes supports simple and/or multicolumn mapping. + + + + + Responsible for converting a of HBM XML into an instance of + . + + + + + Responsible for building a list of objects from a range of acceptable + sources. + + + + + Calls the greedy constructor, passing it new instances of and + . + + + + Adds any embedded resource streams which pass the . + An assembly containing embedded mapping documents. + A custom filter. + + + Adds any embedded resource streams which pass the default filter. + An assembly containing embedded mapping documents. + + + + Responsible for converting a of HBM XML into an instance of + . + + Uses an to deserialize HBM. + + + + Queues mapping files according to their dependency order. + + + + + Adds the specified document to the queue. + + + + + Gets a that can now be processed (i.e. + that doesn't depend on classes not yet processed). + + + + + + Checks that no unprocessed documents remain in the queue. + + + + + Holds information about mapped classes found in an embedded resource + + + + + Gets the names of all entities outside this resource + needed by the classes in this resource. + + + + + Gets the names of all entities in this resource + + + + + The session factory name. + + + + + Session factory properties bag. + + + + + Session factory mapping configuration. + + + + + Session factory class-cache configurations. + + + + + Session factory collection-cache configurations. + + + + + Session factory event configurations. + + + + + Session factory listener configurations. + + + + + Settings that affect the behavior of NHibernate at runtime. + + + + + Get the registry to provide Hql-Generators for known properties/methods. + + + + + Reads configuration properties and configures a instance. + + + + + Converts a partial class name into a fully qualified one + + + + + + + + Converts a partial class name into a fully one + + + + The class FullName (without the assembly) + + The FullName is equivalent to the default entity-name + + + + + Attempts to find a type by its full name. Throws a + using the provided in case of failure. + + name of the class to find + Error message to use for + the in case of failure. Should contain + the {0} formatting placeholder. + A instance. + + Thrown when there is an error loading the class. + + + + + Similar to , but handles short class names + by calling . + + + + + + + + + Called for all collections. parameter + was added in NH to allow for reflection related to generic types. + + + + + Called for arrays and primitive arrays + + + + + Called for Maps + + + + + Called for all collections + + + + + Provides callbacks from the to the persistent object. Persistent classes may + implement this interface but they are not required to. + + + + , , and are intended to be used + to cascade saves and deletions of dependent objects. This is an alternative to declaring cascaded + operations in the mapping file. + + + may be used to initialize transient properties of the object from its persistent + state. It may not be used to load dependent objects since the interface + may not be invoked from inside this method. + + + A further intended usage of , , and + is to store a reference to the for later use. + + + If , , or return + , the operation is silently vetoed. If a + is thrown, the operation is vetoed and the exception is passed back to the application. + + + Note that is called after an identifier is assigned to the object, except when + identity key generation is used. + + + + + + Called when an entity is saved + + The session + If we should veto the save + + + + Called when an entity is passed to . + + The session + A value indicating whether the operation + should be vetoed or allowed to proceed. + + This method is not called every time the object's state is + persisted during a flush. + + + + + Called when an entity is deleted + + The session + A value indicating whether the operation + should be vetoed or allowed to proceed. + + + + Called after an entity is loaded. + + + It is illegal to access the from inside this method.. + However, the object may keep a reference to the session for later use + + The session + The identifier + + + + Veto the action + + + + + Accept the action + + + + + Implemented by persistent classes with invariants that must be checked before inserting + into or updating the database + + + + + Validate the state of the object before persisting it. If a violation occurs, + throw a . This method must not change the state of the object + by side-effect. + + + + + Thrown from when an invariant was violated. Some applications + might subclass this exception in order to provide more information about the violation + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Transforms Criteria queries + + + + + Returns a clone of the original criteria, which will return the count + of rows that are returned by the original criteria query. + + + + + Returns a clone of the original criteria, which will return the count + of rows that are returned by the original criteria query. + + + + + Creates an exact clone of the criteria + + + + + + Creates an exact clone of the criteria + + + + + + Used to show a better debug display for dictionaries + + + + + Initializes a new instance of the class. + + The message that describes the error. + The name of the duplicate object + The type of the duplicate object + + + + Initializes a new instance of the class. + + The name of the duplicate object + The type of the duplicate object + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + The type of the duplicated object + + + + + The name of the duplicated object + + + + + An interceptor that does nothing. May be used as a base class for application-defined custom interceptors. + + + + + The singleton reference. + + + + Defines the representation modes available for entities. + + + + Implementation of ADOException indicating problems with communicating with the + database (can also include incorrect ADO setup). + + + + + Collect data of an to be converted. + + + + + The to be converted. + + + + + An optional error message. + + + + + The SQL that generate the exception + + + + + Optional EntityName where available in the original exception context. + + + + + Optional EntityId where available in the original exception context. + + + + + Converts the given SQLException into Exception hierarchy, as well as performing + appropriate logging. + + The converter to use. + The exception to convert. + An optional error message. + The SQL executed. + The converted . + + + + Converts the given SQLException into Exception hierarchy, as well as performing + appropriate logging. + + The converter to use. + The exception to convert. + An optional error message. + The converted . + + + For the given , locates the . + The exception from which to extract the + The , or null. + + + + Exception aggregating exceptions that occurs in the O-R persistence layer. + + + + + Initializes a new instance of the class. + + The exceptions to aggregate. + + + + Initializes a new instance of the class. + + The exceptions to aggregate. + + + + Initializes a new instance of the class. + + The message that describes the error. + The exceptions to aggregate. + + + + Initializes a new instance of the class. + + The message that describes the error. + The exceptions to aggregate. + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Return a string representation of the aggregate exception. + + A string representation with inner exceptions. + + + + Implementation of ADOException indicating that the requested DML operation + resulted in a violation of a defined integrity constraint. + + + + + Returns the name of the violated constraint, if known. + + The name of the violated constraint, or null if not known. + + + + Implementation of ADOException indicating that evaluation of the + valid SQL statement against the given data resulted in some + illegal operation, mismatched types or incorrect cardinality. + + + + + The Configurable interface defines the contract for impls that + want to be configured prior to usage given the currently defined Hibernate properties. + + + + Configure the component, using the given settings and properties. + All defined startup properties. + + + + Defines a contract for implementations that know how to convert a + into NHibernate's hierarchy. + + + Inspired by Spring's SQLExceptionTranslator. + + Implementations must have a constructor which takes a + parameter. + + Implementations may implement if they need to perform + configuration steps prior to first use. + + + + + + Convert the given into custom Exception. + + Available information during exception throw. + The resulting Exception to throw. + + + + Defines a contract for implementations that can extract the name of a violated + constraint from a SQLException that is the result of that constraint violation. + + + + + Extract the name of the violated constraint from the given SQLException. + + The exception that was the result of the constraint violation. + The extracted constraint name. + + + + Implementation of ADOException indicating a problem acquiring lock + on the database. + + + + A factory for building SQLExceptionConverter instances. + + + Build a SQLExceptionConverter instance. + The defined dialect. + The configuration properties. + An appropriate instance. + + First, looks for a property to see + if the configuration specified the class of a specific converter to use. If this + property is set, attempt to construct an instance of that class. If not set, or + if construction fails, the converter specific to the dialect will be used. + + + + + Builds a minimal converter. The instance returned here just always converts to . + + The minimal converter. + + + + Implementation of ADOException indicating that the SQL sent to the database + server was invalid (syntax error, invalid object references, etc). + + + + + A SQLExceptionConverter implementation which performs no conversion of + the underlying . + Interpretation of a SQL error based on + is not possible as using the ErrorCode (which is, however, vendor- + specific). Use of a ErrorCode-based converter should be preferred approach + for converting/interpreting SQLExceptions. + + + + Handle an exception not converted to a specific type based on the SQLState. + The exception to be handled. + An optional message + Optionally, the sql being performed when the exception occurred. + The converted exception; should never be null. + + + + Knows how to extract a violated constraint name from an error message based on the + fact that the constraint name is templated within the message. + + + + + Extracts the constraint name based on a template (i.e., templateStartconstraintNametemplateEnd). + + The pattern denoting the start of the constraint name within the message. + The pattern denoting the end of the constraint name within the message. + The templated error message containing the constraint name. + The found constraint name, or null. + + + + Extract the name of the violated constraint from the given SQLException. + + The exception that was the result of the constraint violation. + The extracted constraint name. + + + + Represents a fetching strategy. + + + + For Hql queries, use the FETCH keyword instead. + For Criteria queries, use Fetch functions instead. + + + + + + Default to the setting configured in the mapping file. + + + + + Fetch eagerly, using a separate select. Equivalent to + fetch="select" (and outer-join="false") + + + + + Fetch using an outer join. Equivalent to + fetch="join" (and outer-join="true") + + + + + Indicates that an expected getter or setter method could not be found on a class + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Represents a flushing strategy. + + + The flush process synchronizes database state with session state by detecting state + changes and executing SQL statements + + + + + Special value for unspecified flush mode (like in Java). + + + + + The ISession is never flushed unless Flush() is explicitly + called by the application. This mode is very efficient for read only + transactions + + + + + The ISession is never flushed unless Flush() is explicitly + called by the application. This mode is very efficient for read only + transactions + + + + + The ISession is flushed when Transaction.Commit() is called + + + + + The ISession is sometimes flushed before query execution in order to + ensure that queries never return stale state. This is the default flush mode. + + + + + The is flushed before every query. This is + almost always unnecessary and inefficient. + + + + + Any exception that occurs in the O-R persistence layer. + + + Exceptions that occur in the database layer are left as native exceptions. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Provides XML marshalling for classes registered with a SessionFactory + + + + Hibernate defines a generic XML format that may be used to represent any class + (hibernate-generic.dtd). 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 hibernate-default.xslt which maps data to a useful human- + readable format. + + + The property xml.output_stylesheet 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 + + + It is not intended that implementors be threadsafe + + + + + + Add an object to the output document. + + A transient or persistent instance + Databinder + + + + Add a collection of objects to the output document + + A collection of transient or persistent instance + Databinder + + + + Output the generic XML representation of the bound objects + + Generic Xml representation + + + + Output the generic XML Representation of the bound objects + to a XmlDocument + + A generic Xml tree + + + + Output the custom XML representation of the bound objects + + Custom Xml representation + + + + Output the custom XML representation of the bound objects as + an XmlDocument + + A custom Xml Tree + + + + Controls whether bound objects (and their associated objects) that are lazily instantiated + are explicitly initialized or left as they are + + True to explicitly initialize lazy objects, false to leave them in the state they are in + + + + Performs a null safe comparison using "==" instead of Object.Equals() + + First object to compare. + Second object to compare. + + true if x is the same instance as y or if both are null references; otherwise, false. + + + This is Lazy collection safe since it uses , + unlike Object.Equals() which currently causes NHibernate to load up the collection. + This behaivior of Collections is likely to change because Java's collections override Equals() and + .net's collections don't. So in .net there is no need to override Equals() and + GetHashCode() on the NHibernate Collection implementations. + + + + + Interface to create queries in "detached mode" where the NHibernate session is not available. + All methods have the same semantics as the corresponding methods of the interface. + + + + + Get an executable instance of , + to actually run the query. + + + + Set the maximum number of rows to retrieve. + + The maximum number of rows to retrieve. + + + + Sets the first row to retrieve. + + The first row to retrieve. + + + + Enable caching of this query result set. + + Should the query results be cacheable? + + + Set the name of the cache region. + The name of a query cache region, or + for the default query cache + + + + Entities retrieved by this query will be loaded in + a read-only mode where Hibernate will never dirty-check + them or make changes persistent. + + Enable/Disable read -only mode + + + + Set a timeout for the underlying ADO.NET query. + + The timeout in seconds. + (for method chaining). + + + Set a fetch size for the underlying ADO query. + the fetch size + + + + Set the lockmode for the objects identified by the + given alias that appears in the FROM clause. + + alias a query alias, or this for a collection filter + + + + Add a comment to the generated SQL. + a human-readable string + + + + Bind a value to an indexed parameter. + + Position of the parameter in the query, numbered from 0 + The possibly null parameter value + The Hibernate type + + + + Bind a value to a named query parameter + + The name of the parameter + The possibly null parameter value + The NHibernate . + + + + Bind a value to an indexed parameter, guessing the Hibernate type from + the class of the given object. + + The position of the parameter in the query, numbered from 0 + The non-null parameter value + + + + Bind a value to a named query parameter, guessing the NHibernate + from the class of the given object. + + The name of the parameter + The non-null parameter value + + + + Bind multiple values to a named query parameter. This is useful for binding a list + of values to an expression such as foo.bar in (:value_list) + + The name of the parameter + A collection of values to list + The Hibernate type of the values + + + + Bind multiple values to a named query parameter, guessing the Hibernate + type from the class of the first object in the collection. This is useful for binding a list + of values to an expression such as foo.bar in (:value_list) + + The name of the parameter + A collection of values to list + + + + Bind the property values of the given object to named parameters of the query, + matching property names with parameter names and mapping property types to + Hibernate types using heuristics. + + Any POCO + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a array to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a array. + + + + Bind an instance of a array to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a array. + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + Since v5.0, does no more cut fractional seconds. Use + for this + + + + Bind an instance of a to a named parameter + using an NHibernate . + + A non-null instance of a . + The name of the parameter + Since v5.0, does no more cut fractional seconds. Use + for this + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + A non-null instance of a . + The name of the parameter + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a mapped persistent class to an indexed parameter. + + Position of the parameter in the query string, numbered from 0 + A non-null instance of a persistent class + + + + Bind an instance of a mapped persistent class to a named parameter. + + The name of the parameter + A non-null instance of a persistent class + + + + Bind an instance of a persistent enumeration class to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a persistent enumeration + + + + Bind an instance of a persistent enumeration class to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a persistent enumeration + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + An instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + An instance of a . + + + + Override the current session flush mode, just for this query. + + + + + Set a strategy for handling the query results. This can be used to change + "shape" of the query result. + + + + + Set the value to ignore unknown parameters names. + + True to ignore unknown parameters names. + + + Override the current session cache mode, just for this query. + The cache mode to use. + this (for method chaining) + + + + Type definition of Filter. Filter defines the user's view into enabled dynamic filters, + allowing them to set filter parameter values. + + + + + Get the name of this filter. + + This filter's name. + + + + Get the filter definition containing additional information about the + filter (such as default-condition and expected parameter names/types). + + The filter definition + + + + Set the named parameter's value list for this filter. + + The parameter's name. + The values to be applied. + This FilterImpl instance (for method chaining). + + + + Set the named parameter's value list for this filter. Used + in conjunction with IN-style filter criteria. + + The parameter's name. + The values to be expanded into an SQL IN list. + The type of the values. + This FilterImpl instance (for method chaining). + + + + Perform validation of the filter state. This is used to verify the + state of the filter after its activation and before its use. + + + + + + A deferred query result. Accessing its enumerable result will trigger execution of all other pending futures. + This interface is directly usable as a for backward compatibility, but this will + be dropped in a later version. Please get the from + or . + + The type of the enumerated elements. + + + + Asynchronously triggers the future query and all other pending future if the query was not already resolved, then + returns a non-deferred enumerable of the query resulting items. + + A cancellation token that can be used to cancel the work. + A non-deferred enumerable listing the resulting items of the future query. + + + + Synchronously triggers the future query and all other pending future if the query was not already resolved, then + returns a non-deferred enumerable of the query resulting items. + + A non-deferred enumerable listing the resulting items of the future query. + + + + Synchronously triggers the future query and all other pending future if the query was not already resolved, then + returns a non-deferred enumerator of the query resulting items. + + A non-deferred enumerator listing the resulting items of the future query. + + + + An object allowing to get at the value of a future query. + + The type of the value returned by the query. + + + + The value of the future query. If not already resolved, triggers all pending future query execution. + + + + + Asynchronously get the value of the future query. If not already resolved, triggers all pending future query execution. + Otherwise, this synchronously returns the already resolved value. + + A cancellation token that can be used to cancel the work. + The value of the future query. + + + + Allows user code to inspect and/or change property values before they are written and after they + are read from the database + + + + There might be a single instance of IInterceptor for a SessionFactory, or a new + instance might be specified for each ISession. Whichever approach is used, the interceptor + must be serializable if the ISession is to be serializable. This means that SessionFactory + -scoped interceptors should implement ReadResolve(). + + + The ISession may not be invoked from a callback (nor may a callback cause a collection or + proxy to be lazily initialized). + + + + + + Called just before an object is initialized + + + + + + + + The interceptor may change the state, which will be propagated to the persistent + object. Note that when this method is called, entity will be an empty + uninitialized instance of the class. + if the user modified the state in any way + + + + Called when an object is detected to be dirty, during a flush. + + + + + + + + + The interceptor may modify the detected currentState, which will be propagated to + both the database and the persistent object. Note that all flushes end in an actual + synchronization with the database, in which as the new currentState will be propagated + to the object, but not necessarily (immediately) to the database. It is strongly recommended + that the interceptor not modify the previousState. + + if the user modified the currentState in any way + + + + Called before an object is saved + + + + + + + + The interceptor may modify the state, which will be used for the SQL INSERT + and propagated to the persistent object + + if the user modified the state in any way + + + + Called before an object is deleted + + + + + + + + It is not recommended that the interceptor modify the state. + + + + Called before a collection is (re)created. + + + Called before a collection is deleted. + + + Called before a collection is updated. + + + + Called before a flush + + The entities + + + + Called after a flush that actually ends in execution of the SQL statements required to + synchronize in-memory state with the database. + + The entities + + + + Called when a transient entity is passed to SaveOrUpdate. + + + The return value determines if the object is saved + + - the entity is passed to Save(), resulting in an INSERT + - the entity is passed to Update(), resulting in an UPDATE + - Hibernate uses the unsaved-value mapping to determine if the object is unsaved + + + A transient entity + Boolean or to choose default behaviour + + + + Called from Flush(). The return value determines whether the entity is updated + + + + an array of property indicies - the entity is dirty + an empty array - the entity is not dirty + - use Hibernate's default dirty-checking algorithm + + + A persistent entity + + + + + + An array of dirty property indicies or to choose default behavior + + + + Instantiate the entity class. Return to indicate that Hibernate should use the default + constructor of the class + + the name of the entity + the identifier of the new instance + An instance of the class, or to choose default behaviour + + The identifier property of the returned instance + should be initialized with the given identifier. + + + + Get the entity name for a persistent or transient instance + an entity instance + the name of the entity + + + Get a fully loaded entity instance that is cached externally + the name of the entity + the instance identifier + a fully initialized entity + + + + Called when a NHibernate transaction is begun via the NHibernate + API. Will not be called if transactions are being controlled via some other mechanism. + + + + + Called before a transaction is committed (but not before rollback). + + + + + Called after a transaction is committed or rolled back. + + + + Called when sql string is being prepared. + sql to be prepared + original or modified sql + + + + Called when a session-scoped (and only session scoped) interceptor is attached + to a session + + + session-scoped-interceptor is an instance of the interceptor used only for one session. + The use of singleton-interceptor may cause problems in multi-thread scenario. + + + + + + + Set a timeout for the underlying ADO.NET query. + + The timeout in seconds. + The on which to set the timeout. + (for method chaining). + + + + Thrown if Hibernate can't instantiate an entity or component class at runtime. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + The that NHibernate was trying to instantiate. + + + + Gets the that NHibernate was trying to instantiate. + + + + + Gets a message that describes the current . + + + The error message that explains the reason for this exception and the Type that + was trying to be instantiated. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Sets the serialization info for after + getting the info from the base Exception. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + Helper class for dealing with enhanced entity classes. + + + Contract for field interception handlers. + + + Is the entity considered dirty? + True if the entity is dirty; otherwise false. + + + Use to associate the entity to which we are bound to the given session. + + + Is the entity to which we are bound completely initialized? + + + The the given field initialized for the entity to which we are bound? + The name of the field to check + True if the given field is initialized; otherwise false. + + + Forcefully mark the entity as being dirty. + + + Clear the internal dirty flag. + + + Intercept field set/get + + + Get the entity-name of the field DeclaringType. + + + Get the MappedClass (field container). + + + Marker value for uninitialized properties + + + Contract for controlling how lazy properties get initialized. + + + Initialize the property, and return its new value + + + + Thrown when an invalid type is specified as a proxy for a class. + The exception is also thrown when a class is specified as lazy, + but cannot be used as a proxy for itself. + + + + + Access the underlying ICriteria + + + + + Access the root underlying ICriteria + + + + + QueryOver<TRoot,TSubType> is an API for retrieving entities by composing + objects expressed using Lambda expression syntax. + + + + IList<Cat> cats = session.QueryOver<Cat>() + .Where( c => c.Name == "Tigger" ) + .And( c => c.Weight > minWeight ) ) + .List(); + + + + + + Add criterion expressed as a lambda expression + + Lambda expression + criteria instance + + + + Add criterion expressed as a lambda expression + + Lambda expression + criteria instance + + + + Add arbitrary ICriterion (e.g., to allow protected member access) + + + + + Add negation of criterion expressed as a lambda expression + + Lambda expression + criteria instance + + + + Add negation of criterion expressed as a lambda expression + + Lambda expression + criteria instance + + + + Add negation of criterion expressed as ICriterion + + + + + Add restriction to a property + + Lambda expression containing path to property + criteria instance + + + + Add restriction to a property + + Lambda expression containing path to property + criteria instance + + + + Identical semantics to And() to allow more readable queries + + Lambda expression + criteria instance + + + + Identical semantics to And() to allow more readable queries + + Lambda expression + criteria instance + + + + Add arbitrary ICriterion (e.g., to allow protected member access) + + + + + Identical semantics to AndNot() to allow more readable queries + + Lambda expression + criteria instance + + + + Identical semantics to AndNot() to allow more readable queries + + Lambda expression + criteria instance + + + + Identical semantics to AndNot() to allow more readable queries + + + + + Identical semantics to AndRestrictionOn() to allow more readable queries + + Lambda expression + criteria instance + + + + Identical semantics to AndRestrictionOn() to allow more readable queries + + Lambda expression + criteria instance + + + + Add projection expressed as a lambda expression + + Lambda expressions + criteria instance + + + + Add arbitrary IProjections to query + + + + + Create a list of projections using a projection builder + + + + + Add order expressed as a lambda expression + + Lambda expression + criteria instance + + + + Add order expressed as a lambda expression + + Lambda expression + criteria instance + + + + Order by arbitrary IProjection (e.g., to allow protected member access) + + + + + Add order for an aliased projection expressed as a lambda expression + + Lambda expression + criteria instance + + + + Add order expressed as a lambda expression + + Lambda expression + criteria instance + + + + Add order expressed as a lambda expression + + Lambda expression + criteria instance + + + + Order by arbitrary IProjection (e.g., to allow protected member access) + + + + + Add order for an aliased projection expressed as a lambda expression + + Lambda expression + criteria instance + + + + Transform the results using the supplied IResultTransformer + + + + + Add a subquery expression + + + + + Specify an association fetching strategy. Currently, only + one-to-many and one-to-one associations are supported. + + A lambda expression path (e.g., ChildList[0].Granchildren[0].Pets). + + + + + Set the lock mode of the current entity + + + + + Set the lock mode of the aliased entity + + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + + Type of sub-criteria + Lambda expression returning association path + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + + Type of sub-criteria + Lambda expression returning association path + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + + Type of sub-criteria + Lambda expression returning association path + Lambda expression returning alias reference + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + + Type of sub-criteria + Lambda expression returning association path + Lambda expression returning alias reference + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + + Type of sub-criteria + Lambda expression returning association path + Type of join + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + + Type of sub-criteria + Lambda expression returning association path + Type of join + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + + Type of sub-criteria + Lambda expression returning association path + Lambda expression returning alias reference + Type of join + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + + Type of sub-criteria + Lambda expression returning association path + Lambda expression returning alias reference + Type of join + Additional criterion for the SQL on clause + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + + Type of sub-criteria + Lambda expression returning association path + Lambda expression returning alias reference + Type of join + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + + Type of sub-criteria + Lambda expression returning association path + Lambda expression returning alias reference + Type of join + Additional criterion for the SQL on clause + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + specifying a collection for the join. + + Type of sub-criteria (type of the collection) + Lambda expression returning association path + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + specifying a collection for the join. + + Type of sub-criteria (type of the collection) + Lambda expression returning association path + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + specifying a collection for the join. + + Type of sub-criteria (type of the collection) + Lambda expression returning association path + Lambda expression returning alias reference + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + specifying a collection for the join. + + Type of sub-criteria (type of the collection) + Lambda expression returning association path + Lambda expression returning alias reference + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + specifying a collection for the join. + + Type of sub-criteria (type of the collection) + Lambda expression returning association path + Type of join + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + specifying a collection for the join. + + Type of sub-criteria (type of the collection) + Lambda expression returning association path + Type of join + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + specifying a collection for the join. + + Type of sub-criteria (type of the collection) + Lambda expression returning association path + Lambda expression returning alias reference + Type of join + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + specifying a collection for the join. + + Type of sub-criteria (type of the collection) + Lambda expression returning association path + Lambda expression returning alias reference + Type of join + Additional criterion for the SQL on clause + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + specifying a collection for the join. + + Type of sub-criteria (type of the collection) + Lambda expression returning association path + Lambda expression returning alias reference + Type of join + The created "sub criteria" + + + + Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + specifying a collection for the join. + + Type of sub-criteria (type of the collection) + Lambda expression returning association path + Lambda expression returning alias reference + Type of join + Additional criterion for the SQL on clause + The created "sub criteria" + + + + Join an association, assigning an alias to the joined entity + + Lambda expression returning association path + Lambda expression returning alias reference + criteria instance + + + + Join an association, assigning an alias to the joined entity + + Lambda expression returning association path + Lambda expression returning alias reference + criteria instance + + + + Join an association, assigning an alias to the joined entity + + Lambda expression returning association path + Lambda expression returning alias reference + Type of join + criteria instance + + + + Join an association, assigning an alias to the joined entity + + Lambda expression returning association path + Lambda expression returning alias reference + Type of join + Additional criterion for the SQL on clause + criteria instance + + + + Join an association, assigning an alias to the joined entity + + Type of sub-criteria (type of the collection) + Lambda expression returning association path + Lambda expression returning alias reference + Type of join + Additional criterion for the SQL on clause + criteria instance + + + + Join an association, assigning an alias to the joined entity + + Lambda expression returning association path + Lambda expression returning alias reference + Type of join + criteria instance + + + + Join an association, assigning an alias to the joined entity + + Lambda expression returning association path + Lambda expression returning alias reference + Type of join + Additional criterion for the SQL on clause + criteria instance + + + + Join an association, assigning an alias to the joined entity + + Type of sub-criteria (type of the collection) + Lambda expression returning association path + Lambda expression returning alias reference + Type of join + Additional criterion for the SQL on clause + criteria instance + + + + Obtain a builder with the ability to grab certain information from + this session. The built IStatelessSession will require its own disposal. + + The session from which to build a stateless session. + The session builder. + + + + Creates a for the session. Batch extension methods are available in the + NHibernate.Multi namespace. + + The session. + A query batch. + + + + Represents a consolidation of all session creation options into a builder style delegate. + + + + + Represents a consolidation of all session creation options into a builder style delegate. + + + + + Opens a session with the specified options. + + The session. + + + + Adds a specific interceptor to the session options. + + The interceptor to use. + , for method chaining. + + + + Signifies that no should be used. + + , for method chaining. + + By default the associated with the is + passed to the whenever we open one without the user having specified a + specific interceptor to use. + + + + + Adds a specific connection to the session options. + + The connection to use. + , for method chaining. + + Note that the second-level cache will be disabled if you + supply a ADO.NET connection. NHibernate will not be able to track + any statements you might have executed in the same transaction. + Consider implementing your own . + + + + + Use a specific connection release mode for these session options. + + The connection release mode to use. + , for method chaining. + + + + Should the session be automatically closed after transaction completion? Not yet implemented, will have no effect. + + Should the session be automatically closed. + , for method chaining. + + + + Should the session be automatically enlisted in ambient system transaction? + Enabled by default. Disabling it does not prevent connections having auto-enlistment + enabled to get enlisted in current ambient transaction when opened. + + Should the session be automatically explicitly + enlisted in ambient transaction. + , for method chaining. + + + + Specify the initial FlushMode to use for the opened Session. + + The initial FlushMode to use for the opened Session. + , for method chaining. + + + + Specialized with access to stuff from another session. + + + + + Signifies that the connection from the original session should be used to create the new session. + The original session remains responsible for it and its closing will cause sharing sessions to be no + more usable. + Causes specified ConnectionReleaseMode and AutoJoinTransaction to be ignored and + replaced by those of the original session. + + , for method chaining. + + + + Signifies the interceptor from the original session should be used to create the new session. + + , for method chaining. + + + + Signifies that the connection release mode from the original session should be used to create the new session. + + , for method chaining. + + + + Signifies that the FlushMode from the original session should be used to create the new session. + + , for method chaining. + + + + Signifies that the AutoClose flag from the original session should be used to create the new session. + + , for method chaining. + + + + Signifies that the AutoJoinTransaction flag from the original session should be used to create the new session. + + , for method chaining. + + + + Specialized with access to stuff from another session. + + + + + Adds a specific connection to the session options. + + The connection to use. + , for method chaining. + + Note that the second-level cache will be disabled if you + supply a ADO.NET connection. NHibernate will not be able to track + any statements you might have executed in the same transaction. + Consider implementing your own . + + + + + Should the session be automatically enlisted in ambient system transaction? + Enabled by default. Disabling it does not prevent connections having auto-enlistment + enabled to get enlisted in current ambient transaction when opened. + + Should the session be automatically explicitly + enlisted in ambient transaction. + , for method chaining. + + + + Signifies that the connection from the original session should be used to create the new session. + The original session remains responsible for it and its closing will cause sharing sessions to be no + more usable. + Causes specified ConnectionReleaseMode and AutoJoinTransaction to be ignored and + replaced by those of the original session. + + , for method chaining. + + + + Signifies that the AutoJoinTransaction flag from the original session should be used to create the new session. + + , for method chaining. + + + + Adds a query space for auto-flush synchronization and second level cache invalidation. + + The query. + The query space. + The query. + + + + Adds an entity name for auto-flush synchronization and second level cache invalidation. + + The query. + The entity name. + The query. + + + + Adds an entity type for auto-flush synchronization and second level cache invalidation. + + The query. + The entity type. + The query. + + + + Returns the synchronized query spaces added to the query. + + The query. + The synchronized query spaces. + + + + Declare a "root" entity, without specifying an alias + + + + + Declare a "root" entity + + + + + Declare a "root" entity, specifying a lock mode + + + + + Declare a "root" entity, without specifying an alias + + + + + Declare a "root" entity + + + + + Declare a "root" entity, specifying a lock mode + + + + + Declare a "joined" entity + + + + + Declare a "joined" entity, specifying a lock mode + + + + + Declare a scalar query result + + + + + Use a predefined named ResultSetMapping + + + + + Creates a for the session. + + The session + A query batch. + + + + Represents a consolidation of all stateless session creation options into a builder style delegate. + + + + + Opens a session with the specified options. + + The session. + + + + Adds a specific connection to the session options. + + The connection to use. + , for method chaining. + + Note that the second-level cache will be disabled if you + supply a ADO.NET connection. NHibernate will not be able to track + any statements you might have executed in the same transaction. + Consider implementing your own . + + + + + Should the session be automatically enlisted in ambient system transaction? + Enabled by default. Disabling it does not prevent connections having auto-enlistment + enabled to get enlisted in current ambient transaction when opened. + + Should the session be automatically explicitly + enlisted in ambient transaction. + , for method chaining. + + + + Applies for the criteria with the given and the + given . + + The select mode to apply. + The criteria association path. If empty, the root entity for the given + criteria is used. + The criteria alias. If empty, the current criteria is used. + + + + Adds a query space for auto-flush synchronization and second level cache invalidation. + + The query space. + The query. + + + + Adds an entity name for auto-flush synchronization and second level cache invalidation. + + The entity name. + The query. + + + + Adds an entity type for auto-flush synchronization and second level cache invalidation. + + The entity type. + The query. + + + + Returns the synchronized query spaces added to the query. + + The synchronized query spaces. + + + + Register an user synchronization callback for this transaction. + + The transaction. + The callback to register. + + + + A problem occurred trying to lazily initialize a collection or proxy (for example the session + was closed) or iterate query results. + + + + + Initializes a new instance of the class. + + The name of the entity where the exception was thrown + The id of the entity where the exception was thrown + The message that describes the error. + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Instances represent a lock mode for a row of a relational database table. + + + It is not intended that users spend much time worrying about locking since Hibernate + usually obtains exactly the right lock level automatically. Some "advanced" users may + wish to explicitly specify lock levels. + + + + + + + + + + + + + + + Is this lock mode more restrictive than the given lock mode? + + + + + + Is this lock mode less restrictive than the given lock mode? + + + + + + No lock required. + + + If an object is requested with this lock mode, a Read lock + might be obtained if necessary. + + + + + A shared lock. + + + Objects are loaded in Read mode by default + + + + + An upgrade lock. + + + Objects loaded in this lock mode are materialized using an + SQL SELECT ... FOR UPDATE + + + + + Attempt to obtain an upgrade lock, using an Oracle-style + SELECT ... FOR UPGRADE NOWAIT. + + + The semantics of this lock mode, once obtained, are the same as Upgrade + + + + + A Write lock is obtained when an object is updated or inserted. + + + This is not a valid mode for Load() or Lock(). + + + + + Similar to except that, for versioned entities, + it results in a forced version increment. + + + + Writes a log entry. + Entry will be written on this level. + The entry to be written. + The exception related to this entry. + + + + Checks if the given is enabled. + + level to be checked. + true if enabled. + + + + Factory interface for providing a . + + + + + Get a logger for the given log key. + + The log key. + A NHibernate logger. + + + + Get a logger using the given type as log key. + + The type to use as log key. + A NHibernate logger. + + + + Provide methods for getting NHibernate loggers according to supplied . + + + By default, it will use a if log4net is available, otherwise it will + use a . + + + + + Specify the logger factory to use for building loggers. + + A logger factory. + + + + Get a logger for the given log key. + + The log key. + A NHibernate logger. + + + + Get a logger using the given type as log key. + + The type to use as log key. + A NHibernate logger. + + + + Instantiates a new instance of the structure. + + A composite format string + An object array that contains zero or more objects to format. Can be null if there are no values to format. + + + + Returns the composite format string. + + + A composite format string consists of zero or more runs of fixed text intermixed with + one or more format items, which are indicated by an index number delimited with brackets + (for example, {0}). The index of each format item corresponds to an argument in an object + list that follows the composite format string. + + + + + An object array that contains zero or more objects to format. Can be null if there are no values to format. + + + + + Returns the string that results from formatting the composite format string along with + its arguments by using the formatting conventions of the current culture. + + + + Defines logging severity levels. + + + + Extensions method for logging. + + + + + Throws NotImplementedException. Calling this method is an error. Please use methods taking the exception as first argument instead. + + + + + Throws NotImplementedException. Calling this method is an error. Please use methods taking the exception as first argument instead. + + + + + Throws NotImplementedException. Calling this method is an error. Please use methods taking the exception as first argument instead. + + + + + Throws NotImplementedException. Calling this method is an error. Please use methods taking the exception as first argument instead. + + + + + Throws NotImplementedException. Calling this method is an error. Please use methods taking the exception as first argument instead. + + + + + Reflection based log4net logger factory. + + + + + Reflection based log4net logger. + + + + + Default constructor. + + The log4net.ILog logger to use for logging. + + + + An exception that usually occurs at configuration time, rather than runtime, as a result of + something screwy in the O-R mappings + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Convenience base class for AuxiliaryDatabaseObjects. + + + This implementation performs dialect scoping checks strictly based on + dialect name comparisons. Custom implementations might want to do + instanceof-type checks. + + + + + A NHibernate any type. + + + Polymorphic association to one of several tables. + + + + + Get or set the identifier type name + + + + + Get or set the metatype + + + + + Represent the relation between a meta-value and the related entityName + + + + + An array has a primary key consisting of the key columns + index column + + + + + A bag permits duplicates, so it has no primary key + + + + + A bag permits duplicates, so it has no primary key. + + The that contains this bag mapping. + + + + Gets the appropriate that is + specialized for this bag mapping. + + + + + Defines behavior of soft-cascade actions. + + + To check the content or to include/exclude values, from cascade, is strongly recommended the usage of extensions methods defined in + + + + + + + + Add or modify a value-class pair. + + The value of the DB-field dor a given association instance (should override ) + The class associated to the specific . + + + + + + + Not supported in NH3. + + + + Using the Join, it is possible to split properties of one class to several tables, when there's a 1-to-1 relationship between the table + + The split-group identifier. By default it is assigned to the join-table-name + The lambda to map the join. + + + + Maps a formula. + + The formula to map. + Replaces any previously mapped column attribute. + + + + A mapper for mapping mixed list of columns and formulas. + + + + + Maps a mixed list of columns and formulas. + + The mappers for each column or formula. + Replaces any previously mapped column or formula. + + + + Maps a formula. + + The formula to map. + Replaces any previously mapped column or formula, unless . + + + + Maps many formulas. + + The formulas to map. + Replaces any previously mapped column or formula. + + + + Maps a mixed list of columns and formulas. + + The mapper. + The mappers for each column or formula. + Replaces any previously mapped column or formula. + + + + Maps a mixed list of columns and formulas. + + The mapper. + The mappers for each column or formula. + Replaces any previously mapped column or formula. + + + + Maps a mixed list of columns and formulas. + + The mapper. + The mappers for each column or formula. + Replaces any previously mapped column or formula. + + + + Maps a mixed list of columns and formulas. + + The mapper. + The mappers for each column or formula. + Replaces any previously mapped column or formula. + + + + Maps a mixed list of columns and formulas. + + The mapper. + The mappers for each column or formula. + Replaces any previously mapped column or formula. + + + + Maps a mixed list of columns and formulas. + + The mapper. + The mappers for each column or formula. + Replaces any previously mapped column or formula. + + + + Maps many formulas. + + The mapper. + The formulas to map. + Replaces any previously mapped column or formula. + + + + Maps many formulas. + + The mapper. + The formulas to map. + Replaces any previously mapped column or formula. + + + + Maps many formulas. + + The mapper. + The formulas to map. + Replaces any previously mapped column or formula. + + + + Maps many formulas. + + The mapper. + The formulas to map. + Replaces any previously mapped column or formula. + + + + Maps many formulas. + + The mapper. + The formulas to map. + Replaces any previously mapped column or formula. + + + + Maps many formulas. + + The mapper. + The formulas to map. + Replaces any previously mapped column or formula. + + + + Force the component to a different type than the one of the property. + + Mapped component type. + + Useful when the property is an interface and you need the mapping to a concrete class mapped as component. + + + + + Set the Foreign-Key name + + The name of the Foreign-Key + + Where the is "none" or or all white-spaces the FK won't be created. + Use null to reset the default NHibernate's behavior. + + + + + Add or modify a value-class pair. + + The value of the DB-field dor a given association instance (should override ) + The class associated to the specific . + + + + Force the many-to-one to a different type than the one of the property. + + Mapped entity type. + + Useful when the property is an interface and you need the mapping to a concrete class mapped as entity. + + + + + + + + + + + + + + Get all candidate persistent properties, or fields, to be used as Persistent-Object-ID, for a given root-entity class or interface. + + The root-entity class or interface. + All candidate properties or fields to be used as Persistent-Object-ID. + + + + Get all candidate persistent properties or fields for a given root-entity class or interface. + + The root-entity class or interface. + All candidate properties or fields. + + + + Get all candidate persistent properties or fields for a given entity subclass or interface. + + The entity subclass or interface. + The superclass (it may be different from ) + All candidate properties or fields. + + In NHibernate, for a subclass, the method should return only those members not included in + its super-classes. + + + + + Get all candidate persistent properties or fields for a given entity subclass or interface. + + The class of the component or an interface. + All candidate properties or fields. + + + + Manage the mapping of a HbmKeyProperty but implementing + instead a more limitated KeyProperty. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Maps many formulas. + + The mapper. + The formulas to map. + + + + Util extensions to use in your test or where you need to see the XML mappings + + + + + Occurs before apply pattern-appliers on a root class. + + + + + Occurs before apply pattern-appliers on a subclass. + + + + + Occurs before apply pattern-appliers on a joined-subclass. + + + + + Occurs before apply pattern-appliers on a union-subclass. + + + + + Occurs after apply the last customizer on a root class. + + + + + Occurs after apply the last customizer on a subclass. + + + + + Occurs after apply the last customizer on a joined-subclass.. + + + + + Occurs after apply the last customizer on a union-subclass.. + + + + + The possible types of polymorphism for IClassMapper. + + + + + Implicit polymorphism + + + + + Explicit polymorphism + + + + + Immutable value class. By-value equality. + + + + + Provide the list of progressive-paths + + + + Given a path as : Pl1.Pl2.Pl3.Pl4.Pl5 returns paths-sequence as: + Pl5 + Pl4.Pl5 + Pl3.Pl4.Pl5 + Pl2.Pl3.Pl4.Pl5 + Pl1.Pl2.Pl3.Pl4.Pl5 + + + + + Dictionary containing the embedded strategies to find a field giving a property name. + The key is the "partial-name" of the strategy used in XML mapping. + The value is an instance of the strategy. + + + + + A which allows customization of conditions with explicitly declared members. + + + + + Decode a member access expression of a specific ReflectedType + + Type to reflect + The expression of the property getter + The os the ReflectedType. + + + + Decode a member access expression of a specific ReflectedType + + Type to reflect + Type of property + The expression of the property getter + The os the ReflectedType. + + + + Given a property or a field try to get the member from a given possible inherited type. + + The member to find. + The type where find the member. + The member from the reflected-type or the original where the is not accessible from . + + + + Try to find a property or field from a given type. + + The type + The property or field name. + + A or a where the member is found; null otherwise. + + + Where found the member is returned always from the declaring type. + + + + + Base class that stores the mapping information for <array>, <bag>, + <id-bag>, <list>, <map>, and <set> + collections. + + + Subclasses are responsible for the specialization required for the particular + collection style. + + + + + Gets or sets a indicating if this is a + mapping for a generic collection. + + + if a collection from the System.Collections.Generic namespace + should be used, if a collection from the System.Collections + namespace should be used. + + + This has no affect on any versions of the .net framework before .net-2.0. + + + + + Gets or sets an array of that contains the arguments + needed to construct an instance of a closed type. + + + + + Represents the mapping to a column in a database. + + + + + Initializes a new instance of . + + + + + Initializes a new instance of . + + The name of the column. + + + + Gets or sets the length of the datatype in the database. + + The length of the datatype in the database. + + + + Gets or sets the name of the column in the database. + + + The name of the column in the database. The get does + not return a Quoted column name. + + +

+ If a value is passed in that is wrapped by ` then + NHibernate will Quote the column whenever SQL is generated + for it. How the column is quoted depends on the Dialect. +

+

+ The value returned by the getter is not Quoted. To get the + column name in quoted form use . +

+
+
+ + + Gets the name of this Column in quoted form if it is necessary. + + + The that knows how to quote + the column name. + + + The column name in a form that is safe to use inside of a SQL statement. + Quoted if it needs to be, not quoted if it does not need to be. + + + + + For any column name, generate an alias that is unique to that + column name, and also take Dialect.MaxAliasLength into account. + It keeps four characters left for accommodating additional suffixes. + + + + + For any column name, generate an alias that is unique to that + column name and table, and also take Dialect.MaxAliasLength into account. + It keeps four characters left for accommodating additional suffixes. + + + + + Gets or sets if the column can have null values in it. + + if the column can have a null value in it. + + + + Gets or sets the index of the column in the . + + + The index of the column in the . + + + + + Gets or sets if the column contains unique values. + + if the column contains unique values. + + + + Gets the name of the data type for the column. + + The to use to get the valid data types. + + + The name of the data type for the column. + + + If the mapping file contains a value of the attribute sql-type this will + return the string contained in that attribute. Otherwise it will use the + typename from the of the object. + + + + + Determines if this instance of and a specified object, + which must be a Column can be considered the same. + + An that should be a . + + if the name of this Column and the other Column are the same, + otherwise . + + + + + Determines if this instance of and the specified Column + can be considered the same. + + A to compare to this Column. + + if the name of this Column and the other Column are the same, + otherwise . + + + + + Returns the hash code for this instance. + + + + + Gets or sets the sql data type name of the column. + + + The sql data type name of the column. + + + This is usually read from the sql-type attribute. + + + + + Gets or sets if the column needs to be quoted in SQL statements. + + if the column is quoted. + + + + Gets or sets whether the column is unique. + + + + + Gets or sets a check constraint on the column + + + + + Do we have a check constraint? + + + + + The underlying columns SqlType. + + + If null, it is because the sqltype code is unknown. + + Use to retreive the sqltypecode used + for the columns associated Value/Type. + + + + returns quoted name as it would be in the mapping file. + + + Shallow copy, the value is not copied + + + + The mapping for a component, composite element, composite identifier, + etc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Base class for relational constraints in the database. + + + + + Gets or sets the Name used to identify the constraint in the database. + + The Name used to identify the constraint in the database. + + + + Gets an of objects that are part of the constraint. + + + An of objects that are part of the constraint. + + + + + Generate a name hopefully unique using the table and column names. + Static so the name can be generated prior to creating the Constraint. + They're cached, keyed by name, in multiple locations. + + A name prefix for the generated name. + The table for which the name is generated. + The referenced table, if any. + The columns for which the name is generated. + The generated name. + Hybrid of Hibernate Constraint.generateName and + NamingHelper.generateHashedFkName. + + + + Adds the to the of + Columns that are part of the constraint. + + The to include in the Constraint. + + + + Gets the number of columns that this Constraint contains. + + + The number of columns that this Constraint contains. + + + + + Gets or sets the this Constraint is in. + + + The this Constraint is in. + + + + + Generates the SQL string to drop this Constraint in the database. + + The to use for SQL rules. + + + + A string that contains the SQL to drop this Constraint. + + + + + Generates the SQL string to create this Constraint in the database. + + The to use for SQL rules. + + + + + A string that contains the SQL to create this Constraint. + + + + + When implemented by a class, generates the SQL string to create the named + Constraint in the database. + + The to use for SQL rules. + The name to use as the identifier of the constraint in the database. + + + + A string that contains the SQL to create the named Constraint. + + + + + A value which is "typed" by reference to some other value + (for example, a foreign key is typed by the referenced primary key). + + + + + A Foreign Key constraint in the database. + + + + + Generates the SQL string to create the named Foreign Key Constraint in the database. + + The to use for SQL rules. + The name to use as the identifier of the constraint in the database. + + + + A string that contains the SQL to create the named Foreign Key Constraint. + + + + + Gets or sets the that the Foreign Key is referencing. + + The the Foreign Key is referencing. + + Thrown when the number of columns in this Foreign Key is not the same + amount of columns as the Primary Key in the ReferencedTable. + + + + + Get the SQL string to drop this Constraint in the database. + + The to use for SQL rules. + + + + A string that contains the SQL to drop this Constraint. + + + + + Validates that columnspan of the foreignkey and the primarykey is the same. + Furthermore it aligns the length of the underlying tables columns. + + + + Does this foreignkey reference the primary key of the reference table + + + + A formula is a derived column value. + + + + + + + + + + + + + + + + + + + Auxiliary database objects (i.e., triggers, stored procedures, etc) defined + in the mappings. Allows Hibernate to manage their lifecycle as part of + creating/dropping the schema. + + + + + Add the given dialect name to the scope of dialects to which + this database object applies. + + The name of a dialect. + + + + Does this database object apply to the given dialect? + + The dialect to check against. + True if this database object does apply to the given dialect. + + + + Gets called by NHibernate to pass the configured type parameters to the implementation. + + + + + An PersistentIdentifierBag has a primary key consisting of just + the identifier column. + + + + + A collection with a synthetic "identifier" column. + + + + + + + + + + + + + + + + + + + + + + + + + + Any mapping with an outer-join attribute + + + + + Defines mapping elements to which filters may be applied. + + + + + Represents an identifying key of a table: the value for primary key + of an entity, or a foreign key of a collection or join table or + joined subclass table. + + + + Common interface for things that can handle meta attributes. + + + + Meta-Attribute collection. + + + + + Retrieve the + + The attribute name + The if exists; null otherwise + + + + An Index in the database. + + + + + Generates the SQL string to create this Index in the database. + + The to use for SQL rules. + + + + + A string that contains the SQL to create this Index. + + + + + Generates the SQL string to drop this Index in the database. + + The to use for SQL rules. + + + + A string that contains the SQL to drop this Index. + + + + + Gets or sets the this Index is in. + + + The this Index is in. + + + + + Gets an of objects that are + part of the Index. + + + An of objects that are + part of the Index. + + + + + Adds the to the of + Columns that are part of the Index. + + The to include in the Index. + + + + Gets or sets the Name used to identify the Index in the database. + + The Name used to identify the Index in the database. + + + + Indexed collections include IList, IDictionary, Arrays + and primitive Arrays. + + + + + Operations to create/drop the mapping element in the database. + + + + + When implemented by a class, generates the SQL string to create + the mapping element in the database. + + The to use for SQL rules. + + + + + A string that contains the SQL to create an object. + + + + + When implemented by a class, generates the SQL string to drop + the mapping element from the database. + + The to use for SQL rules. + + + + A string that contains the SQL to drop an object. + + + + + A value is anything that is persisted by value, instead of + by reference. It is essentially a Hibernate IType, together + with zero or more columns. Values are wrapped by things with + higher level semantics, for example properties, collections, + classes. + + + + + Gets the number of columns that this value spans in the table. + + + + + Gets an of objects + that this value is stored in. + + + + + Gets the to read/write the Values. + + + + + Gets the this Value is stored in. + + + + + Gets a indicating if this Value is unique. + + + + + Gets a indicating if this Value can have + null values. + + + + + Gets a indicating if this is a SimpleValue + that does not involve foreign keys. + + + + + + + + + + Determines if the Value is part of a valid mapping. + + The to validate. + + if the Value is part of a valid mapping, + otherwise. + + + + Mainly used to make sure that Value maps to the correct number + of columns. + + + + + A list has a primary key consisting of the key columns + index column + + + + + Initializes a new instance of the class. + + The that contains this list mapping. + + + + Gets the appropriate that is + specialized for this list mapping. + + + + A many-to-one association mapping + + + + + + + + + + + + + A map has a primary key consisting of the key columns + + index columns. + + + + + Initializes a new instance of the class. + + The that contains this map mapping. + + + + Gets the appropriate that is + specialized for this list mapping. + + + + + A meta attribute is a named value or values. + + + + + A mapping for a one-to-many association. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No foreign key element for a one-to-many + + + + A mapping for a one-to-one association. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Base class for the mapped by <class> and a + that is mapped by <subclass> or + <joined-subclass>. + + + + + + + + + + + Gets the that is being mapped. + + The that is being mapped. + + The value of this is set by the name attribute on the <class> + element. + + + + + Gets or sets the to use as a Proxy. + + The to use as a Proxy. + + The value of this is set by the proxy attribute. + + + + + Gets or Sets if the Insert Sql is built dynamically. + + if the Sql is built at runtime. + + The value of this is set by the dynamic-insert attribute. + + + + + Gets or Sets if the Update Sql is built dynamically. + + if the Sql is built at runtime. + + The value of this is set by the dynamic-update attribute. + + + + + Gets or Sets the value to use as the discriminator for the Class. + + + A value that distinguishes this subclass in the database. + + + The value of this is set by the discriminator-value attribute. Each <subclass> + in a hierarchy must define a unique discriminator-value. The default value + is the class name if no value is supplied. + + + + + Gets the number of subclasses that inherit either directly or indirectly. + + The number of subclasses that inherit from this PersistentClass. + + + + Iterate over subclasses in a special 'order', most derived subclasses first. + + + It will recursively go through Subclasses so that if a SubclassType has Subclasses + it will pick those up also. + + + + + Gets an of objects + that directly inherit from this PersistentClass. + + + An of objects + that directly inherit from this PersistentClass. + + + + + When implemented by a class, gets a boolean indicating if this + mapped class is inherited from another. + + + if this class is a subclass or joined-subclass + that inherited from another class. + + + + + When implemented by a class, gets a boolean indicating if the mapped class + has a version property. + + if there is a <version> property. + + + + When implemented by a class, gets an + of objects that this mapped class contains. + + + An of objects that + this mapped class contains. + + + This is all of the properties of this mapped class and each mapped class that + it is inheriting from. + + + + + When implemented by a class, gets an + of objects that this mapped class reads from + and writes to. + + + An of objects that + this mapped class reads from and writes to. + + + This is all of the tables of this mapped class and each mapped class that + it is inheriting from. + + + + + Gets an of objects that + this mapped class contains and that all of its subclasses contain. + + + An of objects that + this mapped class contains and that all of its subclasses contain. + + + + + Gets an of all of the objects that the + subclass finds its information in. + + An of objects. + It adds the TableClosureIterator and the subclassTables into the IEnumerable. + + + + When implemented by a class, gets or sets the of the Persister. + + + + + When implemented by a class, gets the of the class + that is mapped in the class element. + + + The of the class that is mapped in the class element. + + + + + + + + + + + + + + + Build a collection of properties which are "referenceable". + + + See for a discussion of "referenceable". + + + + + + + + + + + + + + + Build an iterator over the properties defined on this class. The returned + iterator only accounts for "normal" properties (i.e. non-identifier + properties). + + + An of objects. + + + Differs from in that the iterator + we return here will include properties defined as part of a join. + + + + + Build an enumerable over the properties defined on this class which + are not defined as part of a join. + As with the returned iterator only accounts + for non-identifier properties. + + An enumerable over the non-joined "normal" properties. + + + + + + + + + Adds a to the class hierarchy. + + The to add to the hierarchy. + + + + Gets a boolean indicating if this PersistentClass has any subclasses. + + if this PeristentClass has any subclasses. + + + + Change the property definition or add a new property definition + + The to add. + + + + Gets or Sets the that this class is stored in. + + The this class is stored in. + + The value of this is set by the table attribute. + + + + + When implemented by a class, gets or set a boolean indicating + if the mapped class has properties that can be changed. + + if the object is mutable. + + The value of this is set by the mutable attribute. + + + + + When implemented by a class, gets a boolean indicating + if the mapped class has a Property for the id. + + if there is a Property for the id. + + + + When implemented by a class, gets or sets the + that is used as the id. + + + The that is used as the id. + + + + + When implemented by a class, gets or sets the + that contains information about the identifier. + + The that contains information about the identifier. + + + + When implemented by a class, gets or sets the + that is used as the version. + + The that is used as the version. + + + + When implemented by a class, gets or sets the + that contains information about the discriminator. + + The that contains information about the discriminator. + + + + When implemented by a class, gets or sets if the mapped class has subclasses or is + a subclass. + + + if the mapped class has subclasses or is a subclass. + + + + + When implemented by a class, gets or sets the CacheConcurrencyStrategy + to use to read/write instances of the persistent class to the Cache. + + The CacheConcurrencyStrategy used with the Cache. + + + + When implemented by a class, gets or sets the + that this mapped class is extending. + + + The that this mapped class is extending. + + + + + When implemented by a class, gets or sets a boolean indicating if + explicit polymorphism should be used in Queries. + + + if only classes queried on should be returned, + if any class in the heirarchy should implicitly be returned. + + The value of this is set by the polymorphism attribute. + + + + + + + + + + Adds a that is implemented by a subclass. + + The implemented by a subclass. + + + + Adds a that a subclass is stored in. + + The the subclass is stored in. + + + + When implemented by a class, gets or sets a boolean indicating if the identifier is + embedded in the class. + + if the class identifies itself. + + An embedded identifier is true when using a composite-id specifying + properties of the class as the key-property instead of using a class + as the composite-id. + + + + + When implemented by a class, gets the of the class + that is mapped in the class element. + + + The of the class that is mapped in the class element. + + + + + When implemented by a class, gets or sets the + that contains information about the Key. + + The that contains information about the Key. + + + + Creates the for the + this type is persisted in. + + The that is used to Alias columns. + + + + Creates the for the + this type is persisted in. + + + + + When implemented by a class, gets or sets the sql string that should + be a part of the where clause. + + + The sql string that should be a part of the where clause. + + + The value of this is set by the where attribute. + + + + + Given a property path, locate the appropriate referenceable property reference. + + + A referenceable property is a property which can be a target of a foreign-key + mapping (an identifier or explicitly named in a property-ref). + + The property path to resolve into a property reference. + The property reference (never null). + If the property could not be found. + + + + + + + + + + Gets or sets a boolean indicating if only values in the discriminator column that + are mapped will be included in the sql. + + if the mapped discriminator values should be forced. + + The value of this is set by the force attribute on the discriminator element. + + + + + A Primary Key constraint in the database. + + + + + Generates the SQL string to create the Primary Key Constraint in the database. + + The to use for SQL rules. + + + A string that contains the SQL to create the Primary Key Constraint. + + + + + Generates the SQL string to create the named Primary Key Constraint in the database. + + The to use for SQL rules. + The name to use as the identifier of the constraint in the database. + + + + A string that contains the SQL to create the named Primary Key Constraint. + + + + + Get the SQL string to drop this Constraint in the database. + + The to use for SQL rules. + + + + A string that contains the SQL to drop this Constraint. + + + + + A primitive array has a primary key consisting + of the key columns + index column. + + + + + Mapping for a property of a .NET class (entity + or component). + + + + + Gets the number of columns this property uses in the db. + + + + + Gets an of s. + + + + + Gets or Sets the name of the Property in the class. + + + + + + + + Indicates whether given properties are generated by the database and, if + so, at what time(s) they are generated. + + + + + Values for this property are never generated by the database. + + + + + Values for this property are generated by the database on insert. + + + + + Values for this property are generated by the database on both insert and update. + + + + + + + + + + Declaration of a System.Type mapped with the <class> element that + is the root class of a table-per-subclass, or table-per-concrete-class + inheritance hierarchy. + + + + + The default name of the column for the Identifier + + id is the default column name for the Identifier. + + + + The default name of the column for the Discriminator + + class is the default column name for the Discriminator. + + + + Gets a boolean indicating if this mapped class is inherited from another. + + + because this is the root mapped class. + + + + + Gets an of objects that this mapped class contains. + + + An of objects that + this mapped class contains. + + + + + Gets an of objects that this + mapped class reads from and writes to. + + + An of objects that + this mapped class reads from and writes to. + + + There is only one in the since + this is the root class. + + + + + Gets a boolean indicating if the mapped class has a version property. + + if there is a Property for a version. + + + + Gets the of the class + that is mapped in the class element. + + + The of the class this mapped class. + + + + + Gets or sets a boolean indicating if the identifier is + embedded in the class. + + if the class identifies itself. + + An embedded identifier is true when using a composite-id specifying + properties of the class as the key-property instead of using a class + as the composite-id. + + + + + Gets or sets the cache region name. + + The region name used with the Cache. + + + + + + + + + Gets or sets the that is used as the id. + + + The that is used as the id. + + + + + Gets or sets the that contains information about the identifier. + + The that contains information about the identifier. + + + + Gets a boolean indicating if the mapped class has a Property for the id. + + if there is a Property for the id. + + + + Gets or sets the that contains information about the discriminator. + + The that contains information about the discriminator. + + + + Gets or sets if the mapped class has subclasses. + + + if the mapped class has subclasses. + + + + + Gets the of the class that is mapped in the class element. + + + this since this is the root mapped class. + + + + + Adds a to the class hierarchy. + + The to add to the hierarchy. + + When a is added this mapped class has the property + set to . + + + + + Gets or sets a boolean indicating if explicit polymorphism should be used in Queries. + + + if only classes queried on should be returned, + if any class in the hierarchy should implicitly be returned. + + + + + Gets or sets the that is used as the version. + + The that is used as the version. + + + + Gets or set a boolean indicating if the mapped class has properties that can be changed. + + if the object is mutable. + + + + Gets or sets the that this mapped class is extending. + + + since this is the root class. + + + Thrown when the setter is called. The Superclass can not be set on the + RootClass, only the SubclassType can have a Superclass set. + + + + + Gets or sets the that contains information about the Key. + + The that contains information about the Key. + + + + + + + + + Gets or sets a boolean indicating if only values in the discriminator column that + are mapped will be included in the sql. + + if the mapped discriminator values should be forced. + + + + Gets or sets the sql string that should be a part of the where clause. + + + The sql string that should be a part of the where clause. + + + + + + + + + + + Gets or sets the CacheConcurrencyStrategy + to use to read/write instances of the persistent class to the Cache. + + The CacheConcurrencyStrategy used with the Cache. + + + + A Set with no nullable element columns will have a primary + key consisting of all table columns (ie - key columns + + element columns). + + + + + A simple implementation of AbstractAuxiliaryDatabaseObject in which the CREATE and DROP strings are + provided up front. + + + Contains simple facilities for templating the catalog and schema + names into the provided strings. + This is the form created when the mapping documents use <create/> and <drop/>. + + + + + Any value that maps to columns. + + + + + Declaration of a System.Type mapped with the <subclass> or + <joined-subclass> element. + + + + + Initializes a new instance of the class. + + The that is the superclass. + + + + Gets a boolean indicating if this mapped class is inherited from another. + + + because this is a SubclassType. + + + + + Gets an of objects that this mapped class contains. + + + An of objects that + this mapped class contains. + + + This is all of the properties of this mapped class and each mapped class that + it is inheriting from. + + + + + Gets an of objects that this + mapped class reads from and writes to. + + + An of objects that + this mapped class reads from and writes to. + + + This is all of the tables of this mapped class and each mapped class that + it is inheriting from. + + + + + Gets a boolean indicating if the mapped class has a version property. + + if for the Superclass there is a Property for a version. + + + + + + + + + Gets the of the class + that is mapped in the class element. + + + The of the Superclass that is mapped in the class element. + + + + + + + + + + Gets or sets the CacheConcurrencyStrategy + to use to read/write instances of the persistent class to the Cache. + + The CacheConcurrencyStrategy used with the Cache. + + + + Gets the of the class that is mapped in the class element. + + + The of the Superclass that is mapped in the class element. + + + + + Gets or sets the that this mapped class is extending. + + + The that this mapped class is extending. + + + + + Gets or sets the that is used as the id. + + + The from the Superclass that is used as the id. + + + + + Gets or sets the that contains information about the identifier. + + The from the Superclass that contains information about the identifier. + + + + Gets a boolean indicating if the mapped class has a Property for the id. + + if in the Superclass there is a Property for the id. + + + + Gets or sets the that contains information about the discriminator. + + The from the Superclass that contains information about the discriminator. + + + + Gets or set a boolean indicating if the mapped class has properties that can be changed. + + if the Superclass is mutable. + + + + Gets or sets if the mapped class is a subclass. + + + since this mapped class is a subclass. + + + The setter should not be used to set the value to anything but . + + + + + Add the to this PersistentClass. + + The to add. + + This also adds the to the Superclass' collection + of SubclassType Properties. + + + + + Adds a that is implemented by a subclass. + + The implemented by a subclass. + + This also adds the to the Superclass' collection + of SubclassType Properties. + + + + + Adds a that a subclass is stored in. + + The the subclass is stored in. + + This also adds the to the Superclass' collection + of SubclassType Tables. + + + + + Gets or sets the that is used as the version. + + The from the Superclass that is used as the version. + + + + Gets or sets a boolean indicating if the identifier is + embedded in the class. + + if the Superclass has an embedded identifier. + + An embedded identifier is true when using a composite-id specifying + properties of the class as the key-property instead of using a class + as the composite-id. + + + + + Gets or sets the that contains information about the Key. + + The that contains information about the Key. + + + + Gets or sets a boolean indicating if explicit polymorphism should be used in Queries. + + + The value of the Superclasses IsExplicitPolymorphism property. + + + + + Gets the sql string that should be a part of the where clause. + + + The sql string that should be a part of the where clause. + + + Thrown when the setter is called. The where clause can not be set on the + SubclassType, only the RootClass. + + + + + + + + + + Gets or Sets the that this class is stored in. + + The this class is stored in. + + This also adds the to the Superclass' collection + of SubclassType Tables. + + + + + + + + + + Represents a Table in a database that an object gets mapped against. + + + + + Initializes a new instance of . + + + + + Gets or sets the name of the Table in the database. + + + The name of the Table in the database. The get does + not return a Quoted Table name. + + +

+ If a value is passed in that is wrapped by ` then + NHibernate will Quote the Table whenever SQL is generated + for it. How the Table is quoted depends on the Dialect. +

+

+ The value returned by the getter is not Quoted. To get the + column name in quoted form use . +

+
+
+ + + Gets the number of columns that this Table contains. + + + The number of columns that this Table contains. + + + + + Gets an of objects that + are part of the Table. + + + An of objects that are + part of the Table. + + + + + Gets an of objects that + are part of the Table. + + + An of objects that are + part of the Table. + + + + + Gets an of objects that + are part of the Table. + + + An of objects that are + part of the Table. + + + + + Gets an of objects that + are part of the Table. + + + An of objects that are + part of the Table. + + + + + Gets or sets the of the Table. + + The of the Table. + + + + Gets or sets the schema the table is in. + + + The schema the table is in or if no schema is specified. + + + + + Gets the unique number of the Table. + Used for SQL alias generation + + The unique number of the Table. + + + + Gets or sets if the column needs to be quoted in SQL statements. + + if the column is quoted. + + + + Generates the SQL string to create this Table in the database. + + The to use for SQL rules. + + + + + A string that contains the SQL to create this Table, Primary Key Constraints + , and Unique Key Constraints. + + + + + Generates the SQL string to drop this Table in the database. + + The to use for SQL rules. + + + + A string that contains the SQL to drop this Table and to cascade the drop to + the constraints if the database supports it. + + + + + Gets the schema qualified name of the Table. + + The that knows how to Quote the Table name. + The name of the table qualified with the schema if one is specified. + + + + Gets the schema qualified name of the Table using the specified qualifier + + The that knows how to Quote the Table name. + The catalog name. + The schema name. + A String representing the Qualified name. + If this were used with MSSQL it would return a dbo.table_name. + + + returns quoted name as it would be in the mapping file. + + + + Gets the name of this Table in quoted form if it is necessary. + + + The that knows how to quote the Table name. + + + The Table name in a form that is safe to use inside of a SQL statement. + Quoted if it needs to be, not quoted if it does not need to be. + + + + returns quoted name as it is in the mapping file. + + + returns quoted name as it is in the mapping file. + + + + Gets the schema for this table in quoted form if it is necessary. + + + The that knows how to quote the schema name. + + + The schema name for this table in a form that is safe to use inside + of a SQL statement. Quoted if it needs to be, not quoted if it does not need to be. + + + + + Gets the at the specified index. + + The index of the Column to get. + + The at the specified index. + + + + + Adds the to the of + Columns that are part of the Table. + + The to include in the Table. + + + + Gets the identified by the name. + + The name of the to get. + + The identified by the name. If the + identified by the name does not exist then it is created. + + + + + Gets the identified by the name. + + The name of the to get. + + The identified by the name. If the + identified by the name does not exist then it is created. + + + + + Create a for the columns in the Table. + + + An of objects. + + + + A for the columns in the Table. + + + This does not necessarily create a , if + one already exists for the columns then it will return an + existing . + + + + + Generates a unique string for an of + objects. + + An of objects. + + An unique string for the objects. + + + + + Sets the Identifier of the Table. + + The that represents the Identifier. + + + + + + + + + Return the column which is identified by column provided as argument. + column with at least a name. + + The underlying column or null if not inside this table. + Note: the instance *can* be different than the input parameter, but the name will be the same. + + + + + A simple-point association (ie. a reference to another entity). + + + + + + + + + + + + + + + + + + + + Placeholder for typedef information + + + + An Unique Key constraint in the database. + + + + + Generates the SQL string to create the Unique Key Constraint in the database. + + The to use for SQL rules. + A string that contains the SQL to create the Unique Key Constraint. + + + + Generates the SQL string to create the Unique Key Constraint in the database. + + The to use for SQL rules. + + + + + A string that contains the SQL to create the Unique Key Constraint. + + + + + Get the SQL string to drop this Constraint in the database. + + The to use for SQL rules. + + + + A string that contains the SQL to drop this Constraint. + + + + + Exposes entity class metadata to the application + + + + + + The name of the entity + + + + + The name of the identifier property (or return null) + + + + + The names of the class' persistent properties + + + + + The identifier Hibernate type + + + + + The Hibernate types of the classes properties + + + + + Are instances of this class mutable? + + + + + Are instances of this class versioned by a timestamp or version number column? + + + + + Gets the index of the version property + + + + + Get the nullability of the class' persistent properties + + + + Get the "laziness" of the properties of this class + + + Which properties hold the natural id? + + + Does this entity extend a mapped superclass? + + + Get the type of a particular (named) property + + + Does the class support dynamic proxies? + + + Does the class have an identifier property? + + + Does this entity declare a natural id? + + + Does this entity have mapped subclasses? + + + Return the values of the mapped properties of the object + + + + The persistent class + + + + + Create a class instance initialized with the given identifier + + + + + Get the value of a particular (named) property + + + + Extract the property values from the given entity. + The entity from which to extract the property values. + The property values. + + + + Set the value of a particular (named) property + + + + + Set the given values to the mapped properties of the given object + + + + + Get the identifier of an instance (throw an exception if no identifier property) + + + + + Set the identifier of an instance (or do nothing if no identifier property) + + + + Does the class implement the interface? + + + Does the class implement the interface? + + + + Get the version number (or timestamp) from the object's version property + (or return null if not versioned) + + + + + Exposes collection metadata to the application + + + + + The collection key type + + + + + The collection element type + + + + + The collection index type (or null if the collection has no index) + + + + + Is the collection indexed? + + + + + The name of this collection role + + + + + Is the collection an array? + + + + + Is the collection a primitive array? + + + + + Is the collection lazily initialized? + + + + + This exception is thrown when an operation would + break session-scoped identity. This occurs if the + user tries to associate two different instances of + the same class with a particular identifier, + in the scope of a single . + + + + + Initializes a new instance of the class. + + The message that describes the error. + The identifier of the object that caused the exception. + The EntityName of the object attempted to be loaded. + + + + Initializes a new instance of the class. + + The identifier of the object that caused the exception. + The EntityName of the object attempted to be loaded. + + + + Initializes a new instance of the class. + + + + + Sets the serialization info for after + getting the info from the base Exception. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Thrown when the application calls IQuery.UniqueResult() + and the query returned more than one result. Unlike all other NHibernate + exceptions, this one is recoverable! + + + + + Initializes a new instance of the class. + + The number of items in the result. + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Thrown when the user tries to pass a deleted object to the ISession. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Thrown when ISession.Load() fails to select a row with + the given primary key (identifier value). This exception might not + be thrown when Load() is called, even if there was no + row on the database, because Load() returns a proxy if + possible. Applications should use ISession.Get() to test if + a row exists in the database. + + + + + Initializes a new instance of the class. + + The identifier of the object that was attempting to be loaded. + The that NHibernate was trying to find a row for in the database. + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Thrown when the user passes a persistent instance to a ISession method that expects a + transient instance + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + Represents a "back-reference" to the id of a collection owner. + + + The Setter implementation for id backrefs. + + + The Getter implementation for id backrefs. + + + + Accesses mapped property values via a get/set pair, which may be nonpublic. + The default (and recommended strategy). + + + + + Create a for the mapped property. + + The to find the Property in. + The name of the mapped Property to get. + + The to use to get the value of the Property from an + instance of the . + + Thrown when a Property specified by the propertyName could not + be found in the . + + + + + Create a for the mapped property. + + The to find the Property in. + The name of the mapped Property to get. + + The to use to set the value of the Property on an + instance of the . + + + Thrown when a Property specified by the propertyName could not + be found in the . + + + + + Helper method to find the Property get. + + The to find the Property in. + The name of the mapped Property to get. + + The for the Property get or + if the Property could not be found. + + + + + Helper method to find the Property set. + + The to find the Property in. + The name of the mapped Property to set. + + The for the Property set or + if the Property could not be found. + + + + + An for a Property get. + + + + + Initializes a new instance of . + + The that contains the Property get. + The for reflection. + The name of the Property. + + + + Gets the value of the Property from the object. + + The object to get the Property value from. + + The value of the Property for the target. + + + + + Gets the that the Property returns. + + The that the Property returns. + + + + Gets the name of the Property. + + The name of the Property. + + + + Gets the for the Property. + + + The for the Property. + + + + + An for a Property set. + + + + + Initializes a new instance of . + + The that contains the Property set. + The for reflection. + The name of the mapped Property. + + + + Sets the value of the Property on the object. + + The object to set the Property value in. + The value to set the Property to. + + Thrown when there is a problem setting the value in the target. + + + + + Gets the name of the mapped Property. + + The name of the mapped Property or . + + + + Gets the for the mapped Property. + + The for the mapped Property. + + + + Implementation of for fields that are prefixed with + an m_ and the PropertyName is changed to camelCase. + + + + + Converts the Property's name into a Field name by making the first character + of the propertyName lowercase and prefixing it with the letter 'm' + and an underscore. + + The name of the mapped property. + The name of the Field in CamelCase format prefixed with an 'm' and an underscore. + + + + Implementation of for fields that are the + camelCase version of the PropertyName + + + + + Converts the Property's name into a Field name by making the first character + lower case. + + The name of the mapped property. + The name of the Field in CamelCase format. + + + + Implementation of for fields that are prefixed with + an underscore and the PropertyName is changed to camelCase. + + + + + Converts the Property's name into a Field name by making the first character + of the propertyName lowercase and prefixing it with an underscore. + + The name of the mapped property. + The name of the Field in CamelCase format prefixed with an underscore. + + + + Access the mapped property by using a Field to get and set the value. + + + The is useful when you expose getter and setters + for a Property, but they have extra code in them that shouldn't be executed when NHibernate + is setting or getting the values for loads or saves. + + + + + Initializes a new instance of . + + + + + Initializes a new instance of . + + The to use. + + + + Gets the used to convert the name of the + mapped Property in the hbm.xml file to the name of the field in the class. + + The or . + + + + Create a to get the value of the mapped Property + through a Field. + + The to find the Property in. + The name of the mapped Property to get. + + The to use to get the value of the Property from an + instance of the . + + Thrown when a Field specified by the propertyName could not + be found in the . + + + + + Create a to set the value of the mapped Property + through a Field. + + The to find the mapped Property in. + The name of the mapped Property to set. + + The to use to set the value of the Property on an + instance of the . + + + Thrown when a Field for the Property specified by the propertyName using the + could not be found in the . + + + + + Helper method to find the Field. + + The to find the Field in. + The name of the Field to find. + + The for the field. + + + Thrown when a field could not be found. + + + + + Converts the mapped property's name into a Field using + the if one exists. + + The name of the Property. + The name of the Field. + + + + An that uses a Field instead of the Property get. + + + + + Initializes a new instance of . + + The that contains the field to use for the Property get. + The for reflection. + The name of the Field. + + + + Gets the value of the Field from the object. + + The object to get the Field value from. + + The value of the Field for the target. + + + + + Gets the that the Field returns. + + The that the Field returns. + + + + Gets the name of the Property. + + since this is a Field - not a Property. + + + + Gets the for the Property. + + since this is a Field - not a Property. + + + + An that uses a Field instead of the Property set. + + + + + Initializes a new instance of . + + The that contains the Field to use for the Property set. + The for reflection. + The name of the Field. + + + + Sets the value of the Field on the object. + + The object to set the Field value in. + The value to set the Field to. + + Thrown when there is a problem setting the value in the target. + + + + + Gets the name of the Property. + + since this is a Field - not a Property. + + + + Gets the for the Property. + + since this is a Field - not a Property. + + + + A Strategy for converting a mapped property name to a Field name. + + + + + When implemented by a class, converts the Property's name into a Field name + + The name of the mapped property. + The name of the Field. + + + + Gets values of a particular mapped property. + + + + + When implemented by a class, gets the value of the Property/Field from the object. + + The object to get the Property/Field value from. + + The value of the Property for the target. + + + Thrown when there is a problem getting the value from the target. + + + + + When implemented by a class, gets the that the Property/Field returns. + + The that the Property returns. + + + + When implemented by a class, gets the name of the Property. + + The name of the Property or . + + This is an optional operation - if the is not + for a Property get then is an acceptable value to return. + + + + + When implemented by a class, gets the for the get + accessor of the property. + + + This is an optional operation - if the is not + for a property get then is an acceptable value to return. + It is used by the proxies to determine which getter to intercept for the + identifier property. + + + + Get the property value from the given owner instance. + The instance containing the value to be retrieved. + a map of merged persistent instances to detached instances + The session from which this request originated. + The extracted value. + + + Represents a "back-reference" to the index of a collection. + + + Constructs a new instance of IndexPropertyAccessor. + The collection role which this back ref references. + The owner entity name. + + + The Setter implementation for index backrefs. + + + The Getter implementation for index backrefs. + + + + An that can emit IL to get the property value. + + + + + Emit IL to get the property value from the object on top of the stack. + + + + + An that can emit IL to set the property value. + + + + + When implemented by a class, gets the of the Property/Field. + + The of the Property/Field. + + + + Emit IL to set the property of an object to the value. The object + is loaded onto the stack first, then the value, then this method + is called. + + + + + Abstracts the notion of a "property". Defines a strategy for accessing the + value of a mapped property. + + + + + When implemented by a class, create a "getter" for the mapped property. + + The to find the Property in. + The name of the mapped Property to get. + + The to use to get the value of the Property from an + instance of the . + + Thrown when a Property specified by the propertyName could not + be found in the . + + + + + When implemented by a class, create a "setter" for the mapped property. + + The to find the Property in. + The name of the mapped Property to set. + + The to use to set the value of the Property on an + instance of the . + + + Thrown when a Property specified by the propertyName could not + be found in the . + + + + + Allow embedded and custom accessors to define if the ReflectionOptimizer can be used. + + + + + Sets values of a particular mapped property. + + + + + When implemented by a class, sets the value of the Property/Field on the object. + + The object to set the Property value in. + The value to set the Property to. + + Thrown when there is a problem setting the value in the target. + + + + + When implemented by a class, gets the name of the Property. + + The name of the Property or . + + This is an optional operation - if it is not implemented then + is an acceptable value to return. + + + + + When implemented by a class, gets the for the set + accessor of the property. + + + This is an optional operation - if the is not + for a property set then is an acceptable value to return. + It is used by the proxies to determine which setter to intercept for the + identifier property. + + + + + Implementation of for fields that are + the PropertyName in all LowerCase characters. + + + + + Converts the Property's name into a Field name by making the all characters + of the propertyName lowercase. + + The name of the mapped property. + The name of the Field in lowercase. + + + + Implementation of for fields that are prefixed with + an underscore and the PropertyName is changed to lower case. + + + + + Converts the Property's name into a Field name by making the all characters + of the propertyName lowercase and prefixing it with an underscore. + + The name of the mapped property. + The name of the Field in lowercase prefixed with an underscore. + + + Used to declare properties not represented at the pojo level + + + A Getter which will always return null. It should not be called anyway. + + + A Setter which will just do nothing. + + + + Access the mapped property through a Property get to get the value + and go directly to the Field to set the value. + + + This is most useful because Classes can provider a get for the Property + that is the <id> but tell NHibernate there is no setter for the Property + so the value should be written directly to the field. + + + + + Initializes a new instance of . + + The to use. + + + + Creates an to get the value from the Property. + + The to find the Property in. + The name of the mapped Property to get. + + The to use to get the value of the Property from an + instance of the . + + Thrown when a Property specified by the propertyName could not + be found in the . + + + + + Create a to set the value of the mapped Property + through a Field. + + The to find the mapped Property in. + The name of the mapped Property to set. + + The to use to set the value of the Property on an + instance of the . + + + Thrown when a Field for the Property specified by the propertyName using the + could not be found in the . + + + + + Converts the Property's name into a Field name by making the first character + of the propertyName uppercase and prefixing it with the letter 'm'. + + The name of the mapped property. + The name of the Field in PascalCase format prefixed with an 'm'. + + + + Implementation of for fields that are prefixed with + an m_ and the first character in PropertyName capitalized. + + + + + Converts the Property's name into a Field name by making the first character + of the propertyName uppercase and prefixing it with the letter 'm' + and an underscore. + + The name of the mapped property. + The name of the Field in PascalCase format prefixed with an 'm' and an underscore. + + + + Implementation of for fields that are prefixed with + an _ and the first character in PropertyName capitalized. + + + + + Converts the Property's name into a Field name by making the first character + of the propertyName uppercase and prefixing it with an underscore. + + The name of the mapped property. + The name of the Field in PascalCase format prefixed with an underscore. + + + + Factory for creating the various PropertyAccessor strategies. + + + + + Initializes the static members in . + + + + + Gets or creates the specified by the type. + + + The specified by the type. + + + The built in ways of accessing the values of Properties in your domain class are: + + + + Access Method + How NHibernate accesses the Mapped Class. + + + property + + The name attribute is the name of the Property. This is the + default implementation. + + + + field + + The name attribute is the name of the field. If you have any Properties + in the Mapped Class those will be bypassed and NHibernate will go straight to the + field. This is a good option if your setters have business rules attached to them + or if you don't want to expose a field through a Getter & Setter. + + + + nosetter + + The name attribute is the name of the Property. NHibernate will use the + Property's get method to retrieve the value and will use the field + to set the value. This is a good option for <id> Properties because this access method + allows users of the Class to get the value of the Id but not set the value. + + + + readonly + + The name attribute is the name of the Property. NHibernate will use the + Property's get method to retrieve the value but will never set the value back in the domain. + This is used for read-only calculated properties with only a get method. + + + + Assembly Qualified Name + + If NHibernate's built in s are not what is needed for your + situation then you are free to build your own. Provide an Assembly Qualified Name so that + NHibernate can call Activator.CreateInstance(AssemblyQualifiedName) to create it. + + + + + In order for the nosetter to know the name of the field to access NHibernate needs to know + what the naming strategy is. The following naming strategies are built into NHibernate: + + + + Naming Strategy + How NHibernate converts the value of the name attribute to a field name. + + + camelcase + + The name attribute should be changed to CamelCase to find the field. + <property name="FooBar" ... > finds a field fooBar. + + + + camelcase-underscore + + The name attribute should be changed to CamelCase and prefixed with + an underscore to find the field. + <property name="FooBar" ... > finds a field _fooBar. + + + + camelcase-m-underscore + + The name attribute should be changed to CamelCase and prefixed with + an 'm' and underscore to find the field. + <property name="FooBar" ... > finds a field m_fooBar. + + + + pascalcase-underscore + + The name attribute should be prefixed with an underscore + to find the field. + <property name="FooBar" ... > finds a field _FooBar. + + + + pascalcase-m-underscore + + The name attribute should be prefixed with an 'm' and underscore + to find the field. + <property name="FooBar" ... > finds a field m_FooBar. + + + + pascalcase-m + + The name attribute should be prefixed with an 'm'. + <property name="FooBar" ... > finds a field mFooBar. + + + + lowercase + + The name attribute should be changed to lowercase to find the field. + <property name="FooBar" ... > finds a field foobar. + + + + lowercase-underscore + + The name attribute should be changed to lowercase and prefixed with + and underscore to find the field. + <property name="FooBar" ... > finds a field _foobar. + + + + + The naming strategy can also be appended at the end of the field access method. Where + this could be useful is a scenario where you do expose a get and set method in the Domain Class + but NHibernate should only use the fields. + + + With a naming strategy and a get/set for the Property available the user of the Domain Class + could write an Hql statement from Foo as foo where foo.SomeProperty = 'a'. If no naming + strategy was specified the Hql statement would have to be from Foo as foo where foo._someProperty + (assuming CamelCase with an underscore field naming strategy is used). + + + + + Retrieves a PropertyAccessor instance based on the given property definition and entity mode. + The property for which to retrieve an accessor. + The mode for the resulting entity. + An appropriate accessor. + + + + Access the mapped property through a Property get to get the value + and do nothing to set the value. + + + This is useful to allow calculated properties in the domain that will never + be recovered from the DB but can be used for querying. + + + + + Initializes a new instance of . + + + + + Creates an to get the value from the Property. + + The to find the Property in. + The name of the mapped Property to get. + + The to use to get the value of the Property from an + instance of the . + + Thrown when a Property specified by the propertyName could not + be found in the . + + + + + Create a to do nothing when trying to + se the value of the mapped Property + + The to find the mapped Property in. + The name of the mapped Property to set. + + An instance of . + + + + + A problem occurred accessing a property of an instance of a persistent class by reflection + + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + A indicating if this was a "setter" operation. + The that NHibernate was trying find the Property or Field in. + The mapped property name that was trying to be accessed. + + + + Gets the that NHibernate was trying find the Property or Field in. + + + + + Gets a message that describes the current . + + + The error message that explains the reason for this exception and + information about the mapped property and its usage. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Sets the serialization info for after + getting the info from the base Exception. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Indicates that an expected getter or setter method could not be found on a class + + + + + Initializes a new instance of the class, + used when a property get/set accessor is missing. + + The that is missing the property + The name of the missing property + The type of the missing accessor + ("getter" or "setter") + + + + Initializes a new instance of the class, + used when a field is missing. + + The that is missing the field + The name of the missing property + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Initializes a new instance of the class. + + The message that describes the error. + The that NHibernate was trying to access. + The name of the Property that was being get/set. + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Sets the serialization info for after + getting the info from the base Exception. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + A problem occurred translating a Hibernate query to SQL due to invalid query syntax, etc. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class. + + The message that describes the error. + The query that contains the error. + + + + Initializes a new instance of the class. + + The message that describes the error. + The query that contains the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class. + + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Gets or sets the of HQL that caused the Exception. + + + + + Gets a message that describes the current . + + The error message that explains the reason for this exception including the HQL. + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Sets the serialization info for after + getting the info from the base Exception. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Represents a replication strategy. + + + + + + Throw an exception when a row already exists + + + + + Ignore replicated entities when a row already exists + + + + + When a row already exists, choose the latest version + + + + + Overwrite existing rows when a row already exists + + + + + Represents fetching options for Criteria + + + + + Default to the setting configured in the mapping file. + + + + + Fetch the entity. + + + + + Fetch the entity and its lazy properties. + + + + + Only identifier columns are added to select statement. Use it for fetching child objects for already loaded + entities. + Entities missing in session will be loaded (lazily if possible, otherwise with additional immediate loads). + + + + + Skips the entity from select statement but keeps joining it in the query. + + + + + Skips fetching for eagerly mapped association (no-op for lazy association). + + + + + Applies a select mode for the given current criteria association paths: + curCriteriaEntityType => curCriteriaEntityType or + curCriteriaEntityType => curCriteriaEntityType.ChildEntity.SubEntity. + + + + + Applies a select mode for the given current criteria association paths: + curCriteriaEntityType => curCriteriaEntityType or + curCriteriaEntityType => curCriteriaEntityType.ChildEntity.SubEntity. + + + + + Fetches the given current criteria association paths: + curCriteriaEntityType => curCriteriaEntityType or + curCriteriaEntityType => curCriteriaEntityType.ChildEntity.SubEntity. + + + + + Fetches the given current criteria association paths: + curCriteriaEntityType => curCriteriaEntityType or + curCriteriaEntityType => curCriteriaEntityType.ChildEntity.SubEntity. + + + + + Applies a select mode for the given aliased criteria association paths: + () => aliasedCriteria or () => aliasedCriteria.ChildEntity.SubEntity. + + + + + Applies a select mode for the given aliased criteria or the current criteria + + The current criteria. + The select mode to apply. + The association path for the given criteria. + The criteria alias. If null or empty, the current criteria will be used. + The current criteria. + + + + Fetches the given current criteria association paths: + curCriteriaEntityType => curCriteriaEntityType or + curCriteriaEntityType => curCriteriaEntityType.ChildEntity.SubEntity. + + + + + Fetches the given aliased criteria or the current criteria association path + + The current criteria. + The association path for the given criteria. + The criteria alias. If null or empty, the current criteria will be used. + The current criteria. + + + + Applies a select mode for the given aliased criteria or the current criteria + + The current criteria. + The select mode to apply. + The association path for the given criteria. + The criteria alias. If null or empty, the current criteria will be used. + The current criteria. + + + + Describes the details of a with the + information required to to generate an . + + + This can store the length of the string that the can hold. + If no value is provided for the length then the Driver is responsible for + setting the properties on the correctly. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The length of the string the should hold. + + + + Describes the details of a with the + information required to generate an . + + + This can store the length of the string that the can hold. + If no value is provided for the length then the Driver is responsible for + setting the properties on the correctly. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The length of the string the should hold. + + + + Describes the details of a that is stored in + a BLOB column with the information required to generate + an . + + +

+ This can store the length of the binary data that the can hold. + If no value is provided for the length then the Driver is responsible for + setting the properties on the correctly. +

+

+ This is only needed by DataProviders (SqlClient) that need to specify a Size for the + DbParameter. Most DataProvider(Oralce) don't need to set the Size so a + BinarySqlType would work just fine. +

+
+
+ + + Describes the details of a with the + information required to to generate an . + + + This can store the binary data that the can hold. + If no value is provided for the length then the Driver is responsible for + setting the properties on the correctly. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The length of the binary data the should hold + + + + Describes the details of a . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The number of digit below seconds. + + + + Describes the details of a . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The number of digit below seconds. + + + + Describes the details of a . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The number of digit below seconds. + + + + This is the base class that adds information to the + for the and + to use. + + +

+ The uses the SqlType to get enough + information to create an . +

+

+ The use the SqlType to convert the + to the appropriate sql type for SchemaExport. +

+
+
+ + + SqlTypeFactory provides Singleton access to the SqlTypes. + + + + + Describes the details of a that is stored in + a CLOB column with the information required to generate + an . + + +

+ This can store the length of the binary data that the can hold. + If no value is provided for the length then the Driver is responsible for + setting the properties on the correctly. +

+

+ This is only needed by DataProviders (SqlClient) that need to specify a Size for the + DbParameter. Most DataProvider(Oralce) don't need to set the Size so a + StringSqlType would work just fine. +

+
+
+ + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The length of the string the should hold. + + + + Describes the details of a with the + information required to to generate an . + + + This can store the length of the string that the can hold. + If no value is provided for the length then the Driver is responsible for + setting the properties on the correctly. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The length of the string the should hold. + + + + Describes the details of a with the + information required to generate an . + + + This can store the length of the string that the can hold. + If no value is provided for the length then the Driver is responsible for + setting the properties on the correctly. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The length of the string the should hold. + + + + Describes the details of a . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The number of digit below seconds. + + + + Thrown when a version number check failed, indicating that the + contained stale data (when using long transactions with + versioning). + + + + + Initializes a new instance of the class. + + The EntityName that NHibernate was trying to update in the database. + The identifier of the object that is stale. + + + + Initializes a new instance of the class. + + The EntityName that NHibernate was trying to update in the database. + The identifier of the object that is stale. + The original exception having triggered this exception. + + + + Gets the EntityName that NHibernate was trying to update in the database. + + + + + Gets the identifier of the object that is stale. + + + + + Gets a message that describes the current . + + The error message that explains the reason for this exception. + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Sets the serialization info for after + getting the info from the base Exception. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Statistics for a particular "category" (a named entity, + collection role, second level cache region or query). + + + + Collection related statistics + + + Entity related statistics + + + + Information about the first-level (session) cache for a particular session instance + + + + Get the number of entity instances associated with the session + + + Get the number of collection instances associated with the session + + + Get the set of all EntityKeys. + + + Get the set of all CollectionKeys. + + + + Statistics for a particular . + Beware of metrics, they are dependent of the precision: + + + + Global number of entity deletes + + + Global number of entity inserts + + + Global number of entity loads + + + Global number of entity fetchs + + + Global number of entity updates + + + Global number of executed queries + + + The of the slowest query. + + + The query string for the slowest query. + + + The global number of cached queries successfully retrieved from cache + + + The global number of cached queries *not* found in cache + + + The global number of cacheable queries put in cache + + + Get the global number of flush executed by sessions (either implicit or explicit) + + + + Get the global number of connections asked by the sessions + (the actual number of connections used may be much smaller depending + whether you use a connection pool or not) + + + + Global number of cacheable entities/collections successfully retrieved from the cache + + + Global number of cacheable entities/collections not found in the cache and loaded from the database. + + + Global number of cacheable entities/collections put in the cache + + + Global number of sessions closed + + + Global number of sessions opened + + + Global number of collections loaded + + + Global number of collections fetched + + + Global number of collections updated + + + Global number of collections removed + + + Global number of collections recreated + + + Start time + + + Enable/Disable statistics logs (this is a dynamic parameter) + + + All executed query strings + + + The names of all entities + + + The names of all collection roles + + + Get all second-level cache region names + + + The number of transactions we know to have been successful + + + The number of transactions we know to have completed + + + The number of prepared statements that were acquired + + + The number of prepared statements that were released + + + The number of StaleObjectStateExceptions that occurred + + + Reset all statistics + + + Find entity statistics per name + entity name + EntityStatistics object + + + Get collection statistics per role + collection role + CollectionStatistics + + + Second level cache statistics per region + region name + SecondLevelCacheStatistics + + + Query statistics from query string (HQL or SQL) + query string + QueryStatistics + + + log in info level the main statistics + + + + The OperationThreshold to a value greater than to enable logging of long running operations. + + Operations that exceed the level will be logged. + + + Statistics SPI for the NHibernate core + + + Query statistics (HQL and SQL) + Note that for a cached query, the cache miss is equals to the db count + + + Add statistics report of a DB query + rows count returned + time taken + + + Second level cache statistics of a specific region + + + + Not ported yet + + + + + Not ported yet + + + + + Not ported yet + + + + + Not ported yet + + + + + Indicated that a transaction could not be begun, committed, or rolled back + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + An implementation of TupleSubsetResultTransformer that ignores a + tuple element if its corresponding alias is null. + + @author Gail Badner + + + + Result transformer that allows to transform a result to + a user specified class which will be populated via setter + methods or fields matching the alias names. + + + + IList resultWithAliasedBean = s.CreateCriteria(typeof(Enrollment)) + .CreateAlias("Student", "st") + .CreateAlias("Course", "co") + .SetProjection( Projections.ProjectionList() + .Add( Projections.Property("co.Description"), "CourseDescription") + ) + .SetResultTransformer( new AliasToBeanResultTransformer(typeof(StudentDTO))) + .List(); + + StudentDTO dto = (StudentDTO)resultWithAliasedBean[0]; + + + + Resolves setter for an alias with a heuristic: search among properties then fields for matching name and case, then, + if no matching property or field was found, retry with a case insensitive match. For members having the same name, it + sorts them by inheritance depth then by visibility from public to private, and takes those ranking first. + + + + + Set the value of a property or field matching an alias. + + The alias for which resolving the property or field. + The value to which the property or field should be set. + The object on which to set the property or field. It must be of the type for which + this instance has been built. + Thrown if no matching property or field can be found. + Thrown if many matching properties or fields are found, having the + same visibility and inheritance depth. + + + + A ResultTransformer that is used to transform tuples to a value(s) that can be cached. + + @author Gail Badner + + + + Array with the i-th element indicating whether the i-th + expression returned by a query is included in the tuple. + + IMPLEMENTATION NOTE: + "joined" and "fetched" associations may use the same SQL, + but result in different tuple and cached values. This is + because "fetched" associations are excluded from the tuple. + includeInTuple provides a way to distinguish these 2 cases. + + + + Indexes for tuple that are included in the transformation. + Set to null if all elements in the tuple are included. + + + + + Returns a CacheableResultTransformer that is used to transform + tuples to a value(s) that can be cached. + + result transformer that will ultimately be used (after caching results) + the aliases that correspond to the tuple; + if it is non-null, its length must equal the number + of true elements in includeInTuple[] + array with the i-th element indicating + whether the i-th expression returned by a query is + included in the tuple; the number of true values equals + the length of the tuple that will be transformed; + must be non-null + a CacheableResultTransformer that is used to transform + tuples to a value(s) that can be cached. + + + + Returns a CacheableResultTransformer that is used to transform + tuples to a value(s) that can be cached. + + result transformer that will ultimately be used (after caching results) + the aliases that correspond to the tuple; + if it is non-null, its length must equal the number + of true elements in includeInTuple[] + array with the i-th element indicating + whether the i-th expression returned by a query is + included in the tuple; the number of true values equals + the length of the tuple that will be transformed; + must be non-null + Indicates if types auto-discovery is enabled. + If , the query for which they + will be autodiscovered. + a CacheableResultTransformer that is used to transform + tuples to a value(s) that can be cached. + + + + Returns a CacheableResultTransformer that is used to transform + tuples to a value(s) that can be cached. + + array with the i-th element indicating + whether the i-th expression returned by a query is + included in the tuple; the number of true values equals + the length of the tuple that will be transformed; + must be non-null + Indexes that are included in the transformation. + null if all elements in the tuple are included. + a CacheableResultTransformer that is used to transform + tuples to a value(s) that can be cached. + + + + Re-transforms, if necessary, a List of values previously + transformed by this (or an equivalent) CacheableResultTransformer. + Each element of the list is re-transformed in place (i.e, List + elements are replaced with re-transformed values) and the original + List is returned. If re-transformation is unnecessary, the original List is returned + unchanged. + + Results that were previously transformed. + The aliases that correspond to the untransformed tuple. + The transformer for the re-transformation. + + transformedResults, with each element re-transformed (if necessary). + + + + Untransforms, if necessary, a List of values previously + transformed by this (or an equivalent) CacheableResultTransformer. + Each element of the list is untransformed in place (i.e, List + elements are replaced with untransformed values) and the original + List is returned. + + If not unnecessary, the original List is returned + unchanged. + + + + NOTE: If transformed values are a subset of the original + tuple, then, on return, elements corresponding to + excluded tuple elements will be null. + + Results that were previously transformed. + results, with each element untransformed (if necessary). + + + + Returns the result types for the transformed value. + + + + + "Compact" the given array by picking only the elements identified by + the _includeInTransformIndex array. The picked elements are returned + in a new array. + + + + + Expand the given array by putting each of its elements at the + position identified by the _includeInTransformIndex array. The + elements are placed in a new array - the original array will + not be modified. + + + + + Implementors define a strategy for transforming criteria query + results into the actual application-visible query result list. + + + + + + + + + + + + + + + + + + + + + A ResultTransformer that operates on "well-defined" and consistent + subset of a tuple's elements. + + "Well-defined" means that: +
    +
  1. + the indexes of tuple elements accessed by an + ITupleSubsetResultTransformer depends only on the aliases + and the number of elements in the tuple; i.e, it does + not depend on the value of the tuple being transformed; +
  2. +
  3. + any tuple elements included in the transformed value are + unmodified by the transformation; +
  4. +
  5. + transforming equivalent tuples with the same aliases multiple + times results in transformed values that are equivalent; +
  6. +
  7. + the result of transforming the tuple subset (only those + elements accessed by the transformer) using only the + corresponding aliases is equivalent to transforming the + full tuple with the full array of aliases; +
  8. +
  9. + the result of transforming a tuple with non-accessed tuple + elements and corresponding aliases set to null + is equivalent to transforming the full tuple with the + full array of aliases; +
  10. +
+
+ + @author Gail Badner +
+ + + When a tuple is transformed, is the result a single element of the tuple? + + The aliases that correspond to the tuple. + The number of elements in the tuple. + True, if the transformed value is a single element of the tuple; + false, otherwise. + + + + Returns an array with the i-th element indicating whether the i-th + element of the tuple is included in the transformed value. + + The aliases that correspond to the tuple. + The number of elements in the tuple. + Array with the i-th element indicating whether the i-th + element of the tuple is included in the transformed value. + + + + Transforms each result row from a tuple into a , such that what + you end up with is a of . + + + + + Each row of results is a map () from alias to values/entities + + + + Each row of results is a + + + + Creates a result transformer that will inject aliased values into instances + of via property methods or fields. + + The type of the instances to build. + A result transformer for supplied type. + + Resolves setter for an alias with a heuristic: search among properties then fields for matching name and case, then, + if no matching property or field was found, retry with a case insensitive match. For members having the same name, it + sorts them by inheritance depth then by visibility from public to private, and takes those ranking first. + + + + + Creates a result transformer that will inject aliased values into instances + of via property methods or fields. + + The type of the instances to build. + A result transformer for supplied type. + + Resolves setter for an alias with a heuristic: search among properties then fields for matching name and case, then, + if no matching property or field was found, retry with a case insensitive match. For members having the same name, it + sorts them by inheritance depth then by visibility from public to private, and takes those ranking first. + + + + + Throw when the user passes a transient instance to a ISession method that expects + a persistent instance + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + Support for tuplizers relating to components. + + + This method does not populate the component parent + + + Centralizes metamodel information about a component. + + + + A registry allowing users to define the default class to use per ;. + + + + + A specific to the dynamic-map entity mode. + + + + + Defines further responsibilities regarding tuplization based on + a mapped components. + + + ComponentTuplizer implementations should have the following constructor signature: + (org.hibernate.mapping.Component) + + + + Retrieve the current value of the parent property. + + The component instance from which to extract the parent property value. + + The current value of the parent property. + + + Set the value of the parent property. + The component instance on which to set the parent. + The parent to be set on the component. + The current session factory. + + + Does the component managed by this tuuplizer contain a parent property? + True if the component does contain a parent property; false otherwise. + + + + A specific to the POCO entity mode. + + + + Support for tuplizers relating to entities. + + + Constructs a new AbstractEntityTuplizer instance. + The "interpreted" information relating to the mapped entity. + The parsed "raw" mapping data relating to the given entity. + + + Return the entity-mode handled by this tuplizer instance. + + + Retrieves the defined entity-name for the tuplized entity. + + + + Retrieves the defined entity-names for any subclasses defined for this entity. + + + + Build an appropriate Getter for the given property. + The property to be accessed via the built Getter. + The entity information regarding the mapped entity owning this property. + An appropriate Getter instance. + + + Build an appropriate Setter for the given property. + The property to be accessed via the built Setter. + The entity information regarding the mapped entity owning this property. + An appropriate Setter instance. + + + Build an appropriate Instantiator for the given mapped entity. + The mapping information regarding the mapped entity. + An appropriate Instantiator instance. + + + Build an appropriate ProxyFactory for the given mapped entity. + The mapping information regarding the mapped entity. + The constructed Getter relating to the entity's id property. + The constructed Setter relating to the entity's id property. + An appropriate ProxyFactory instance. + + + Extract a component property value. + The component property types. + The component instance itself. + The property path for the property to be extracted. + The property value extracted. + + + + A registry allowing users to define the default class to use per . + + + + + Defines further responsibilities regarding tuplization based on a mapped entity. + + + EntityTuplizer implementations should have the following constructor signature: + (, ) + + + + + Does the class managed by this tuplizer implement + the interface. + + True if the ILifecycle interface is implemented; false otherwise. + + + + Does the class managed by this tuplizer implement + the interface. + + True if the IValidatable interface is implemented; false otherwise. + + + Returns the java class to which generated proxies will be typed. + The .NET class to which generated proxies will be typed + + + Is it an instrumented POCO? + + + Create an entity instance initialized with the given identifier. + The identifier value for the entity to be instantiated. + The instantiated entity. + + + Extract the identifier value from the given entity. + The entity from which to extract the identifier value. + The identifier value. + + + + Inject the identifier value into the given entity. + + The entity to inject with the identifier value. + The value to be injected as the identifier. + Has no effect if the entity does not define an identifier property + + + + Inject the given identifier and version into the entity, in order to + "roll back" to their original values. + + + The identifier value to inject into the entity. + The version value to inject into the entity. + + + Extract the value of the version property from the given entity. + The entity from which to extract the version value. + The value of the version property, or null if not versioned. + + + Inject the value of a particular property. + The entity into which to inject the value. + The property's index. + The property value to inject. + + + Inject the value of a particular property. + The entity into which to inject the value. + The name of the property. + The property value to inject. + + + Extract the values of the insertable properties of the entity (including backrefs) + The entity from which to extract. + a map of instances being merged to merged instances + The session in which the request is being made. + The insertable property values. + + + Extract the value of a particular property from the given entity. + The entity from which to extract the property value. + The name of the property for which to extract the value. + The current value of the given property on the given entity. + + + Called just after the entities properties have been initialized. + The entity being initialized. + Are defined lazy properties currently unfecthed + The session initializing this entity. + + + Does this entity, for this mode, present a possibility for proxying? + True if this tuplizer can generate proxies for this entity. + + + + Generates an appropriate proxy representation of this entity for this entity-mode. + + The id of the instance for which to generate a proxy. + The session to which the proxy should be bound. + The generate proxies. + + + Does the given entity instance have any currently uninitialized lazy properties? + The entity to be check for uninitialized lazy properties. + True if uninitialized lazy properties were found; false otherwise. + + + An specific to the POCO entity mode. + + + + Represents a defined entity identifier property within the Hibernate + runtime-metamodel. + + + Author: Steve Ebersole + + + + + Construct a non-virtual identifier property. + + The name of the property representing the identifier within + its owning entity. + The Hibernate Type for the identifier property. + Is this an embedded identifier. + The value which, if found as the value on the identifier + property, represents new (i.e., un-saved) instances of the owning entity. + The generator to use for id value generation. + + + + Construct a virtual IdentifierProperty. + + The Hibernate Type for the identifier property. + Is this an embedded identifier. + The value which, if found as the value on the identifier + property, represents new (i.e., un-saved) instances of the owning entity. + The generator to use for id value generation. + + + + Contract for implementors responsible for instantiating entity/component instances. + + + Perform the requested entity instantiation. + The id of the entity to be instantiated. + An appropriately instantiated entity. + This form is never called for component instantiation, only entity instantiation. + + + Perform the requested instantiation. + The instantiated data structure. + + + + Performs check to see if the given object is an instance of the entity + or component which this Instantiator instantiates. + + The object to be checked. + True is the object does represent an instance of the underlying entity/component. + + + + A tuplizer defines the contract for things which know how to manage + a particular representation of a piece of data, given that + representation's (the entity-mode + essentially defining which representation). + + + If that given piece of data is thought of as a data structure, then a tuplizer + is the thing which knows how to: + + create such a data structure appropriately + extract values from and inject values into such a data structure + + + For example, a given piece of data might be represented as a POCO class. + Here, it's representation and entity-mode is POCO. Well a tuplizer for POCO + entity-modes would know how to: + + create the data structure by calling the POCO's constructor + extract and inject values through getters/setter, or by direct field access, etc + + + That same piece of data might also be represented as a DOM structure, using + the tuplizer associated with the XML entity-mode, which would generate instances + of as the data structure and know how to access the + values as either nested s or as s. + + + + + + + Return the pojo class managed by this tuplizer. + + The persistent class. + + Need to determine how to best handle this for the Tuplizers for EntityModes + other than POCO. + + + + + Extract the current values contained on the given entity. + + The entity from which to extract values. + The current property values. + HibernateException + + + Inject the given values into the given entity. + The entity. + The values to be injected. + + + Extract the value of a particular property from the given entity. + The entity from which to extract the property value. + The index of the property for which to extract the value. + The current value of the given property on the given entity. + + + Generate a new, empty entity. + The new, empty entity instance. + + + + Is the given object considered an instance of the the entity (accounting + for entity-mode) managed by this tuplizer. + + The object to be checked. + True if the object is considered as an instance of this entity within the given mode. + + + Defines a POCO-based instantiator for use from the tuplizers. + + + + Defines the basic contract of a Property within the runtime metamodel. + + + + + Constructor for Property instances. + + The name by which the property can be referenced within its owner. + The Hibernate Type of this property. + + + + Responsible for generation of runtime metamodel representations. + Makes distinction between identifier, version, and other (standard) properties. + + + Author: Steve Ebersole + + + + + Generates an IdentifierProperty representation of the for a given entity mapping. + + The mapping definition of the entity. + The identifier value generator to use for this identifier. + The appropriate IdentifierProperty definition. + + + + Generates a VersionProperty representation for an entity mapping given its + version mapping Property. + + The version mapping Property. + Is property lazy loading currently available. + The appropriate VersionProperty definition. + + + + Generate a "standard" (i.e., non-identifier and non-version) based on the given + mapped property. + + The mapped property. + Is property lazy loading currently available. + The appropriate StandardProperty definition. + + + + Represents a basic property within the Hibernate runtime-metamodel. + + + Author: Steve Ebersole + + + + + Constructs StandardProperty instances. + + The name by which the property can be referenced within + its owner. + The Hibernate Type of this property. + Should this property be handled lazily? + Is this property an insertable value? + Is this property an updateable value? + Is this property generated in the database on insert? + Is this property generated in the database on update? + Is this property a nullable value? + Is this property a checkable value? + Is this property a versionable value? + The cascade style for this property's value. + Any fetch mode defined for this property + + + + Represents a version property within the Hibernate runtime-metamodel. + + + Author: Steve Ebersole + + + + + Constructs VersionProperty instances. + + The name by which the property can be referenced within + its owner. + The Hibernate Type of this property. + Should this property be handled lazily? + Is this property an insertable value? + Is this property an updateable value? + Is this property generated in the database on insert? + Is this property generated in the database on update? + Is this property a nullable value? + Is this property a checkable value? + Is this property a versionable value? + The cascade style for this property's value. + The value which, if found as the value of + this (i.e., the version) property, represents new (i.e., un-saved) + instances of the owning entity. + + + + Used when a user provided type does not match the expected one + + + + + Thrown when Hibernate could not resolve an object by id, especially when + loading an association. + + + + + Initializes a new instance of the class. + + The identifier of the object that caused the exception. + The of the object attempted to be loaded. + + + + Initializes a new instance of the class. + + The message that describes the error. + The identifier of the object that caused the exception. + The of the object attempted to be loaded. + + + + A UserType that may be dereferenced in a query. + This interface allows a custom type to define "properties". + These need not necessarily correspond to physical .NET style properties. + + + + An ICompositeUserType may be used in almost every way + that a component may be used. It may even contain many-to-one + associations. + + + Implementors must declare a public default constructor. + + + For ensuring cacheability, and + must provide conversion to/from a cacheable + representation. + + + + + + Get the "property names" that may be used in a query. + + + + + Get the corresponding "property types" + + + + + Get the value of a property + + an instance of class mapped by this "type" + + the property value + + + + Set the value of a property + + an instance of class mapped by this "type" + + the value to set + + + + The class returned by NullSafeGet(). + + + + + Compare two instances of the class mapped by this type for persistence + "equality", ie. equality of persistent state. + + + + + + + + Get a hashcode for the instance, consistent with persistence "equality" + + + + + Retrieve an instance of the mapped class from a DbDataReader. Implementors + should handle possibility of null values. + + DbDataReader + the column names + + the containing entity + + + + + Write an instance of the mapped class to a prepared statement. + Implementors should handle possibility of null values. + A multi-column type should be written to parameters starting from index. + If a property is not settable, skip it and don't increment the index. + + + + + + + + + + Return a deep copy of the persistent state, stopping at entities and at collections. + + generally a collection element or entity field + + + + + Are objects of this type mutable? + + + + + Transform the object into its cacheable representation. + At the very least this method should perform a deep copy. + That may not be enough for some implementations, method should perform a deep copy. That may not be enough for some implementations, however; for example, associations must be cached as identifier values. (optional operation) + + the object to be cached + + + + + + Reconstruct an object from the cacheable representation. + At the very least this method should perform a deep copy. (optional operation) + + the object to be cached + + + + + + + During merge, replace the existing (target) value in the entity we are merging to + with a new (original) value from the detached entity we are merging. For immutable + objects, or null values, it is safe to simply return the first parameter. For + mutable objects, it is safe to return a copy of the first parameter. However, since + composite user types often define component values, it might make sense to recursively + replace component values in the target object. + + + + + A custom type that may function as an identifier or discriminator + type. + + + + + Parse a string representation of this value. + + + + + Return an SQL literal representation of the value + + + + + Return a string representation of this value. It does not need to be xml encoded. + + + + + Marker interface for user types which want to perform custom + logging of their corresponding values + + + + Generate a loggable string representation of the collection (value). + The collection to be logged; guaranteed to be non-null and initialized. + The factory. + The loggable string representation. + + + + Support for parameterizable types. A UserType or CustomUserType may be + made parameterizable by implementing this interface. Parameters for a + type may be set by using a nested type element for the property element + + + + + Gets called by Hibernate to pass the configured type parameters to + the implementation. + + + + + Instantiate an uninitialized instance of the collection wrapper + + + + + Wrap an instance of a collection + + + + + Return an over the elements of this collection - the passed collection + instance may or may not be a wrapper + + + + + Optional operation. Does the collection contain the entity instance? + + + + + Optional operation. Return the index of the entity in the collection. + + + + + Replace the elements of a collection with the elements of another collection + + + + + Instantiate an empty instance of the "underlying" collection (not a wrapper), + but with the given anticipated size (i.e. accounting for initial size + and perhaps load factor). + + + The anticipated size of the instantiated collection + after we are done populating it. Note, may be negative to indicate that + we not yet know anything about the anticipated size (i.e., when initializing + from a result set row by row). + + + + + The interface to be implemented by user-defined types. + + + + The interface abstracts user code from future changes to the interface, + simplifies the implementation of custom types and hides certain "internal interfaces" from + user code. + + + Implementers must declare a public default constructor. + + + The actual class mapped by a IUserType may be just about anything. + + + For ensuring cacheability, and + must provide conversion to/from a cacheable + representation. + + + Alternatively, custom types could implement directly or extend one of the + abstract classes in NHibernate.Type. This approach risks more future incompatible changes + to classes or interfaces in the package. + + + + + + The SQL types for the columns mapped by this type. + + + + + The type returned by NullSafeGet() + + + + + Compare two instances of the class mapped by this type for persistent "equality" + ie. equality of persistent state + + + + + + + + Get a hashcode for the instance, consistent with persistence "equality" + + + + + Retrieve an instance of the mapped class from an ADO resultset. + Implementors should handle possibility of null values. + + a DbDataReader + column names + The session for which the operation is done. Allows access to + Factory.Dialect and Factory.ConnectionProvider.Driver for adjusting to + database or data provider capabilities. + the containing entity + The value. + HibernateException + + + + Write an instance of the mapped class to a prepared statement. + Implementors should handle possibility of null values. + A multi-column type should be written to parameters starting from index. + + a DbCommand + the object to write + command parameter index + The session for which the operation is done. Allows access to + Factory.Dialect and Factory.ConnectionProvider.Driver for adjusting to + database or data provider capabilities. + HibernateException + + + + Return a deep copy of the persistent state, stopping at entities and at collections. + + Generally a collection element or entity field value mapped as this user type. + A copy. + + + + Are objects of this type mutable? + + + + + During merge, replace the existing () value in the entity + we are merging to with a new () value from the detached + entity we are merging. For immutable objects, or null values, it is safe to simply + return the first parameter. For mutable objects, it is safe to return a copy of the + first parameter. For objects with component values, it might make sense to + recursively replace component values. + + the value from the detached entity being merged + the value in the managed entity + the managed entity + the value to be merged + + + + Reconstruct an object from the cacheable representation. At the very least this + method should perform a deep copy if the type is mutable. See + . (Optional operation if the second level cache is not used.) + + The cacheable representation. + The owner of the cached object. + A reconstructed object from the cachable representation. + + + + Transform the object into its cacheable representation. At the very least this + method should perform a deep copy if the type is mutable. That may not be enough + for some implementations, however; for example, associations must be cached as + identifier values. (Optional operation if the second level cache is not used.) + Second level cache implementations may have additional requirements, like the + cacheable representation being binary serializable. + + The object to be cached. + A cacheable representation of the object. + + + + A user type that may be used for a version property. + + + + + Generate an initial version. + + The session from which this request originates. May be + null; currently this only happens during startup when trying to determine + the "unsaved value" of entities. + an instance of the type + + + + Increment the version. + + The session from which this request originates. + the current version + an instance of the type + + + + Helper class that contains common array functions and + data structures used through out NHibernate. + + + + + Append all elements in the 'from' list to the 'to' list. + + + + + + + Calculate a hash code based on the length and contents of the array. + The algorithm is such that if ArrayHelper.ArrayEquals(a,b) returns true, + then ArrayGetHashCode(a) == ArrayGetHashCode(b). + + + + + + + + A read-only dictionary that is always empty and permits lookup by key. + + + + + Determines if two collections have equals elements, with the same ordering. + + The first collection. + The second collection. + true if collection are equals, false otherwise. + + + + Computes a hash code for . + + The hash code is computed as the sum of hash codes of individual elements + plus a length of the collection, so that the value is independent of the + collection iteration order. + + + + + Creates a that uses case-insensitive string comparison + associated with invariant culture. + + + This is different from the method in + in that the latter uses the current culture and is thus vulnerable to the "Turkish I" problem. + + + + + Creates a that uses case-insensitive string comparison + associated with invariant culture. + + + This is different from the method in + in that the latter uses the current culture and is thus vulnerable to the "Turkish I" problem. + + + + + A read-only dictionary that is always empty and permits lookup by key. + + + + + Computes a hash code for . + + The hash code is computed as the sum of hash codes of individual elements + plus a length of the collection, so that the value is independent of the + collection iteration order. + + + + + Computes a hash code for . + + The hash code is computed as the sum of hash codes of individual elements + plus a length of the collection, so that the value is independent of the + collection iteration order. + + + + + Determines if two sets have equal elements. Supports null arguments. + + The type of the elements. + The first set. + The second set. + true if sets are equals, false otherwise. + + + + Determines if two collections have equals elements, with the same ordering. + + The type of the elements. + The first collection. + The second collection. + true if collections are equals, false otherwise. + + + + Determines if two collections have equals elements, with the same ordering. Supports null arguments. + + The type of the elements. + The first collection. + The second collection. + true if collections are equals, false otherwise. + + + + Determines if two collections have equals elements, with the same ordering. Supports null arguments. + + The type of the elements. + The first collection. + The second collection. + The element comparer. + true if collections are equals, false otherwise. + + + + Determines if two collections have the same elements with the same duplication count, whatever their ordering. + Supports null arguments. + + The type of the elements. + The first collection. + The second collection. + true if collections are equals, false otherwise. + + + + Determines if two collections have the same elements with the same duplication count, whatever their ordering. + Supports null arguments. + + The type of the elements. + The first collection. + The second collection. + The element comparer. + true if collections are equals, false otherwise. + + + + Determines if two maps have the same key-values. Supports null arguments. + + The type of the keys. + The type of the values. + The first map. + The second map. + true if maps are equals, false otherwise. + + + + Determines if two maps have the same key-values. Supports null arguments. + + The type of the keys. + The type of the values. + The first map. + The second map. + The value comparer. + true if maps are equals, false otherwise. + + + + Utility class implementing ToString for collections. All ToString + overloads call element.ToString(). + + + To print collections of entities or typed values, use + . + + + + + Wrap a non-generic IEnumerator to provide the generic + interface. + + The type of the enumerated elements. + + + + + + + Get only filters enabled for many-to-one association. + + All enabled filters + A new for filters enabled for many to one. + + + A stable hasher using MurmurHash2 algorithm. + + + + An where keys are compared by object identity, rather than equals. + + All external users of this class need to have no knowledge of the IdentityKey - it is all + hidden by this class. + + + + Do NOT use a System.Value type as the key for this Hashtable - only classes. See + the google thread + about why using System.Value is a bad thing. + + + If I understand it correctly, the first call to get an object defined by a DateTime("2003-01-01") + would box the DateTime and return the identity key for the box. If you were to get that Key and + unbox it into a DateTime struct, then the next time you passed it in as the Key the IdentityMap + would box it again (into a different box) and it would have a different IdentityKey - so you would + not get the same value for the same DateTime value. + + + + + + Create a new instance of the IdentityMap that has no + iteration order. + + A new IdentityMap based on a Hashtable. + + + + Create a new instance of the IdentityMap that has an + iteration order of the order the objects were added + to the Map. + + A new IdentityMap based on ListDictionary. + + + + Return the Dictionary Entries (as instances of DictionaryEntry in a collection + that is safe from concurrent modification). Ie - we may safely add new instances + to the underlying IDictionary during enumeration of the Values. + + The IDictionary to get the enumeration safe list. + A Collection of DictionaryEntries + + + + Create the IdentityMap class with the correct class for the IDictionary. + Unsorted = Hashtable + Sorted = ListDictionary + + A class that implements the IDictionary for storing the objects. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns the Keys used in this IdentityMap + + + + + + + + + + + + + + + + + + + + + + + + + + + + Provides a snapshot VIEW in the form of a List of the contents of the IdentityMap. + You can safely iterate over this VIEW and modify the actual IdentityMap because the + VIEW is a copy of the contents, not a reference to the existing Map. + + Contains a copy (not that actual instance stored) of the DictionaryEntries in a List. + + + + + Verifies that we are not using a System.ValueType as the Key in the Dictionary + + The object that will be the key. + An object that is safe to be a key. + Thrown when the obj is a System.ValueType + + + + Set implementation that use reference equals instead of Equals() as its comparison mechanism. + + + + + Concatenates multiple objects implementing into one. + + + + + Creates an IEnumerable object from multiple IEnumerables. + + The IEnumerables to join together. + + + + + + + A flag to indicate if Dispose() has been called. + + + + + Finalizer that ensures the object is correctly disposed of. + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + Indicates if this JoinedEnumerable is being Disposed of or Finalized. + + The command is closed and the reader is disposed. This allows other ADO.NET + related actions to occur without needing to move all the way through the + EnumerableImpl. + + + + + A map of objects whose mapping entries are sequenced based on the order in which they were + added. This data structure has fast O(1) search time, deletion time, and insertion time + + + This class is not thread safe. + This class is not a really replication of JDK LinkedHashMap{K, V}, + this class is an adaptation of SequencedHashMap with generics. + + + + + Initializes a new instance of the class that is empty, + has the default initial capacity, and uses the default equality comparer for the key type. + + + + + Initializes a new instance of the class that is empty, + has the specified initial capacity, and uses the default equality comparer for the key type. + + The initial number of elements that the can contain. + + + + Initializes a new instance of the class that is empty, has the default initial capacity, and uses the specified . + + The implementation to use when comparing keys, or null to use the default EqualityComparer for the type of the key. + + + + Initializes a new instance of the class that is empty, has the specified initial capacity, and uses the specified . + + The initial number of elements that the can contain. + The implementation to use when comparing keys, or null to use the default EqualityComparer for the type of the key. + + + + An implementation of a Map which has a maximum size and uses a Least Recently Used + algorithm to remove items from the Map when the maximum size is reached and new items are added. + + + + + Various small helper methods. + + + + + Return an identifying string representation for the object, taking + NHibernate proxies into account. The returned string will be "null", + "classname@hashcode(hash)", or "entityname#identifier". If the object + is an uninitialized NHibernate proxy, take care not to initialize it. + + + + + + + + Helper class for Reflection related code. + + + + + Extract the from a given expression. + + The declaring-type of the method. + The method. + The of the no-generic method or the generic-definition for a generic-method. + + + + + Extract the from a given expression. + + The declaring-type of the method. + The method. + The of the method. + + + + Extract the from a given expression. + + The declaring-type of the method. + The return type of the method. + The method. + The of the method. + + + + Extract the from a given expression. + + The method. + The of the no-generic method or the generic-definition for a generic-method. + + + + + Extract the from a given expression. + + The method. + The of the method. + + + + Get the for a public overload of a given method if the method does not match + given parameter types, otherwise directly yield the given method. + + The method for which finding an overload. + The arguments types of the overload to get. + The of the method. + Whenever possible, use GetMethod() instead for performance reasons. + + + + Gets the field or property to be accessed. + + The declaring-type of the property. + The type of the property. + The expression representing the property getter. + The of the property. + + + + Determine if the specified overrides the + implementation of Equals from + + The to reflect. + if any type in the hierarchy overrides Equals(object). + + + + Determine if the specified overrides the + implementation of GetHashCode from + + The to reflect. + if any type in the hierarchy overrides GetHashCode(). + + + + Finds the for the property in the . + + The to find the property in. + The name of the Property to find. + The name of the property access strategy. + The to get the value of the Property. + + This one takes a propertyAccessor name as we might know the correct strategy by now so we avoid Exceptions which are costly + + + + + Get the NHibernate for the named property of the . + + The to find the Property in. + The name of the property/field to find in the class. + The name of the property accessor for the property. + + The NHibernate for the named property. + + + + + Get the for the named property of a type. + + The to find the property in. + The name of the property/field to find in the class. + The name of the property accessor for the property. + The for the named property. + + + + Get the for the named property of a type. + + The FullName to find the property in. + The name of the property/field to find in the class. + The name of the property accessor for the property. + The for the named property. + + + + Returns a reference to the Type. + + The name of the class or a fully qualified name. + The Type for the Class. + + + + Load a System.Type given its name. + + The class FullName or AssemblyQualifiedName + The System.Type + + If the don't represent an + the method try to find the System.Type scanning all Assemblies of the . + + If no System.Type was found for . + + + + Load a System.Type given its name. + + The class FullName or AssemblyQualifiedName + The System.Type or null + + If the don't represent an + the method try to find the System.Type scanning all Assemblies of the . + + + + + Returns a from an already loaded Assembly or an + Assembly that is loaded with a partial name. + + An . + if an exception should be thrown + in case of an error, otherwise. + + A object that represents the specified type, + or if the type cannot be loaded. + + + Attempts to get a reference to the type from an already loaded assembly. If the + type cannot be found then the assembly is loaded using + . + + + + + Returns the value of the static field of . + + The . + The name of the field in the . + The value contained in the field, or if the type or the field does not exist. + + + + Gets the default no arg constructor for the . + + The to find the constructor for. + + The for the no argument constructor, or if the + type is an abstract class. + + + Thrown when there is a problem calling the method GetConstructor on . + + + + + Finds the constructor that takes the parameters. + + The to find the constructor in. + The objects to use to find the appropriate constructor. + + An that can be used to create the type with + the specified parameters. + + + Thrown when no constructor with the correct signature can be found. + + + + + Determines if the is a non creatable class. + + The to check. + if the is an Abstract Class or an Interface. + + + + Unwraps the supplied + and returns the inner exception preserving the stack trace. + + + The to unwrap. + + The unwrapped exception. + + + + Ensures an exception current stack-trace will be preserved if the exception is explicitly rethrown. + + + The which current stack-trace is to be preserved in case of explicit rethrow. + + The unwrapped exception. + + + + Try to find a method in a given type. + + The given type. + The method info. + The found method or null. + + The , in general, become from another . + + + + + Try to find a property, that can be managed by NHibernate, from a given type. + + The given . + The name of the property to find. + true if the property exists; otherwise false. + + When the user defines a field.xxxxx access strategy should be because both the property and the field exists. + NHibernate can work even when the property does not exist but in this case the user should use the appropriate accessor. + + + + + Check if a method is declared in a given . + + The method to check. + The where the method is really declared. + True if the method is an implementation of the method declared in ; false otherwise. + + + + Used to ensure a collection filtering a given IEnumerable by a certain type. + + The type used like filter. + + + + A map of objects whose mapping entries are sequenced based on the order in which they were + added. This data structure has fast O(1) search time, deletion time, and insertion time + + + This class is not thread safe. + + + + + Construct an empty sentinel used to hold the head (sentinel.next) and the tail (sentinal.prev) + of the list. The sentinal has a key and value + + + + + + Sentinel used to hold the head and tail of the list of entries + + + + + Map of keys to entries + + + + + Holds the number of modifications that have occurred to the map, excluding modifications + made through a collection view's iterator. + + + + + Construct a new sequenced hash map with default initial size and load factor + + + + + Construct a new sequenced hash map with the specified initial size and default load factor + + the initial size for the hash table + + + + Construct a new sequenced hash map with the specified initial size and load factor + + the initial size for the hashtable + the load factor for the hash table + + + + Construct a new sequenced hash map with the specified initial size, hash code provider + and comparer + + the initial size for the hashtable + + + + + Creates an empty Hashtable with the default initial capacity and using the default load factor, + the specified hash code provider and the specified comparer + + + + + + Creates an empty Hashtable with the default initial capacity and using the default load factor, + the specified hash code provider and the specified comparer + + the initial size for the hashtable + the load factor for the hash table + + + + + Removes an internal entry from the linked list. THis does not remove it from the underlying + map. + + + + + + Inserts a new internal entry to the tail of the linked list. This does not add the + entry to the underlying map. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Remove the Entry identified by the Key if it exists. + + The Key to remove. + + + + + + + Return only the Key of the DictionaryEntry + + + + + Return only the Value of the DictionaryEntry + + + + + Return the full DictionaryEntry + + + + + Cache following a "Most Recently Used" (MRU) algorithm for maintaining a + bounded in-memory size; the "Least Recently Used" (LRU) entry is the first + available for removal from the cache. + + + This implementation uses a bounded MRU Map to limit the in-memory size of + the cache. Thus the size of this cache never grows beyond the stated size. + + + + + Cache following a "Most Recently Used" (MRY) algorithm for maintaining a + bounded in-memory size; the "Least Recently Used" (LRU) entry is the first + available for removal from the cache. + + + This implementation uses a "soft limit" to the in-memory size of the cache, + meaning that all cache entries are kept within a completely + {@link java.lang.ref.SoftReference}-based map with the most recently utilized + entries additionally kept in a hard-reference manner to prevent those cache + entries soft references from becoming enqueued by the garbage collector. + Thus the actual size of this cache impl can actually grow beyond the stated + max size bound as long as GC is not actively seeking soft references for + enqueuement. + + + + + + + + This allows for both CRLF and lone LF line separators. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Just a facade for calling string.Split() + We don't use our StringTokenizer because string.Split() is + more efficient (but it only works when we don't want to retrieve the delimiters) + + separators for the tokens of the list + the string that will be broken into tokens + + + + + Splits the String using the StringTokenizer. + + separators for the tokens of the list + the string that will be broken into tokens + true to include the separators in the tokens. + + + This is more powerful than Split because you have the option of including or + not including the separators in the tokens. + + + + + + + + + + + + + + + + + + + + Takes a fully qualified type name and returns the full name of the + Class - includes namespaces. + + + + + + + Takes a fully qualified type name (can include the assembly) and just returns + the name of the Class. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns true if given name is not root property name + + + Returns root name + + + + Returns true if given name is not root property name + + + Returns root name + Returns "unrooted" name, or empty string for root + + + + + Converts a in the format of "true", "t", "false", or "f" to + a . + + The string to convert. + + The value converted to a . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Counts the unquoted instances of the character. + + + + + + + + + + + + + + + + Generate a nice alias for the given class name or collection role + name and unique integer. Subclasses do not have to use + aliases of this form. + + an alias of the form foo1_ + + + + Returns the interned string equal to if there is one, or + otherwise. + + A + A + + + + Return the index of the next line separator, starting at startIndex. If will match + the first CRLF or LF line separator. If there is no match, -1 will be returned. When + returning, newLineLength will be set to the number of characters in the matched line + separator (1 if LF was found, 2 if CRLF was found). + + + + + Check if the given index points to a line separator in the string. Both CRLF and LF + line separators are handled. When returning, newLineLength will be set to the number + of characters matched in the line separator. It will be 2 if a CRLF matched, 1 if LF + matched, and 0 if the index doesn't indicate (the start of) a line separator. + + + + + A StringTokenizer java like object + + + + + + + + + + + + + + + + + + + + + + + + + + Returns an unmodifiable view of the specified IDictionary. + This method allows modules to provide users with "read-only" access to internal dictionary. + Query operations on the returned dictionary "read through" to the specified dictionary, + and attempts to modify the returned dictionary, + whether direct or via its collection views, result in an . + + The type of keys in the dictionary. + The type of values in the dictionary. + + + + Initializes a new instance of the UnmodifiableDictionary class that contains elements wrapped + from the specified IDictionary. + + The whose elements are wrapped. + + + + + + + Count of elements in the collection. Unreliable! + + + + + Thrown when ISession.Load() selects a row with the given primary key (identifier value) + but the row's discriminator value specifies a different subclass from the one requested + + + + + Initializes a new instance of the class. + + The message that describes the error. + The identifier of the object that was being loaded. + The name of entity that NHibernate was told to load. + + + + Gets the identifier of the object that was being loaded. + + + + + Gets the name of entity that NHibernate was told to load. + + + + + Gets a message that describes the current . + + The error message that explains the reason for this exception. + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Sets the serialization info for after + getting the info from the base Exception. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + diff --git a/nhibernateg7/nhibernateg7/bin/Debug/Remotion.Linq.EagerFetching.dll b/nhibernateg7/nhibernateg7/bin/Debug/Remotion.Linq.EagerFetching.dll new file mode 100644 index 0000000..9ca1331 Binary files /dev/null and b/nhibernateg7/nhibernateg7/bin/Debug/Remotion.Linq.EagerFetching.dll differ diff --git a/nhibernateg7/nhibernateg7/bin/Debug/Remotion.Linq.EagerFetching.xml b/nhibernateg7/nhibernateg7/bin/Debug/Remotion.Linq.EagerFetching.xml new file mode 100644 index 0000000..6ea4c31 --- /dev/null +++ b/nhibernateg7/nhibernateg7/bin/Debug/Remotion.Linq.EagerFetching.xml @@ -0,0 +1,813 @@ + + + + Remotion.Linq.EagerFetching + + + + + Indicates the condition parameter of the assertion method. + The method itself should be marked by attribute. + The mandatory argument of the attribute is the assertion type. + + + + + + Initializes new instance of AssertionConditionAttribute + + Specifies condition type + + + + Gets condition type + + + + + Specifies assertion type. If the assertion method argument satisifes the condition, then the execution continues. + Otherwise, execution is assumed to be halted + + + + + Indicates that the marked parameter should be evaluated to true + + + + + Indicates that the marked parameter should be evaluated to false + + + + + Indicates that the marked parameter should be evaluated to null value + + + + + Indicates that the marked parameter should be evaluated to not null value + + + + + Indicates that the marked method is assertion method, i.e. it halts control flow if one of the conditions is satisfied. + To set the condition, mark one of the parameters with attribute + + + + + + When applied to target attribute, specifies a requirement for any type which is marked with + target attribute to implement or inherit specific type or types + + + + [BaseTypeRequired(typeof(IComponent)] // Specify requirement + public class ComponentAttribute : Attribute + {} + + [Component] // ComponentAttribute requires implementing IComponent interface + public class MyComponent : IComponent + {} + + + + + + Initializes new instance of BaseTypeRequiredAttribute + + Specifies which types are required + + + + Gets enumerations of specified base types + + + + + Indicates that the value of marked element could be null sometimes, so the check for null is necessary before its usage + + + + + Indicates that the value of marked type (or its derivatives) cannot be compared using '==' or '!=' operators. + There is only exception to compare with null, it is permitted + + + + + Describes dependency between method input and output + + +

Function definition table syntax:

+ + FDT ::= FDTRow [;FDTRow]* + FDTRow ::= Input => Output | Output <= Input + Input ::= ParameterName: Value [, Input]* + Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + Value ::= true | false | null | notnull | canbenull + + If method has single input parameter, it's name could be omitted.
+ Using "halt" (or "void"/"nothing", which is the same) for method output means that methos doesn't return normally.
+ "canbenull" annotation is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, or use single attribute with rows separated by semicolon.
+
+ + + [ContractAnnotation("=> halt")] public void TerminationMethod() + [ContractAnnotation("halt <= condition: false")] public void Assert(bool condition, string text) // Regular Assertion method + [ContractAnnotation("s:null => true")] public bool IsNullOrEmpty(string s) // String.IsNullOrEmpty + [ContractAnnotation("null => null; notnull => notnull")] public object Transform(object data) // Method which returns null if parameter is null, and not null if parameter is not null + [ContractAnnotation("s:null=>false; =>true,result:notnull; =>false, result:null")] public bool TryParse(string s, out Person result) + + +
+ + + Only entity marked with attribute considered used + + + + + Indicates implicit assignment to a member + + + + + Indicates implicit instantiation of a type with fixed constructor signature. + That means any unused constructor parameters won't be reported as such. + + + + + Indicates implicit instantiation of a type + + + + + Specify what is considered used implicitly when marked with or + + + + + Members of entity marked with attribute are considered used + + + + + Entity marked with attribute and all its members considered used + + + + + Tells code analysis engine if the parameter is completely handled when the invoked method is on stack. + If the parameter is delegate, indicates that delegate is executed while the method is executed. + If the parameter is enumerable, indicates that it is enumerated while the method is executed. + + + + + Indicates that the function argument should be string literal and match one of the parameters of the caller function. + For example, has such parameter. + + + + + Indicates that method is *pure* linq method, with postponed enumeration. C# iterator methods (yield ...) are always LinqTunnel. + + + + + Indicates that marked element should be localized or not. + + + + + Initializes a new instance of the class with + set to . + + + + + Initializes a new instance of the class. + + true if a element should be localized; otherwise, false. + + + + Gets a value indicating whether a element should be localized. + true if a element should be localized; otherwise, false. + + + + + Returns whether the value of the given object is equal to the current . + + The object to test the value equality of. + + true if the value of the given object is equal to that of the current; otherwise, false. + + + + + Returns the hash code for this instance. + + A hash code for the current . + + + + Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes as unused (as well as by other usage inspections) + + + + + Gets value indicating what is meant to be used + + + + + Indicates that IEnumarable, passed as parameter, is not enumerated. + + + + + + Indicates that the function is used to notify class type property value is changed. + + + + + Indicates that the value of marked element could never be null + + + + + This attribute is intended to mark publicly available API which should not be removed and so is treated as used. + + + + + Indicates that method doesn't contain observable side effects. + + + + + Indicates that marked method builds string by format pattern and (optional) arguments. + Parameter, which contains format string, should be given in constructor. + The format string should be in -like form + + + + + Initializes new instance of StringFormatMethodAttribute + + Specifies which parameter of an annotated method should be treated as format-string + + + + Gets format parameter name + + + + + Indicates that the marked method unconditionally terminates control flow execution. + For example, it could unconditionally throw exception + + + + + Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + so this symbol will not be marked as unused (as well as by other usage inspections) + + + + + Gets value indicating what is meant to be used + + + + + This utility class provides methods for checking arguments. + + + Some methods of this class return the value of the parameter. In some cases, this is useful because the value will be converted to another + type: + ("o", o); + } + ]]> + In some other cases, the input value is returned unmodified. This makes it easier to use the argument checks in calls to base class constructors + or property setters: + + + + + Returns the value itself if it is not and of the specified value type. + The type that must have. + The is a . + The is an instance of another type. + + + Checks of the is of the . + The is a . + The is an instance of another type. + + + Returns the value itself if it is of the specified type. + The type that must have. + + is an instance of another type (which is not a subtype of ). + + is null and cannot be null. + + For non-nullable value types, you should use either or pass the type + instead. + + + + Checks whether is not and can be assigned to . + The is . + The cannot be assigned to . + + + Checks whether can be assigned to . + The cannot be assigned to . + + + Checks whether can be assigned to . + The cannot be assigned to . + + + Checks whether all items in are of type or a null reference. + If at least one element is not of the specified type or a derived type. + + + Checks whether all items in are of type and not null references. + If at least one element is not of the specified type or a derived type. + If at least one element is a null reference. + + + + Provides methods that throw an if an assertion fails. + + + + This class contains methods that are conditional to the DEBUG and TRACE attributes ( and ). + + Note that assertion expressions passed to these methods are not evaluated (read: executed) if the respective symbol are not defined during + compilation, nor are the methods called. This increases performance for production builds, but make sure that your assertion expressions do + not cause any side effects! See or and the for more information + about conditional compilation. + + Assertions are no replacement for checking input parameters of public methods (see ). + + + + + + Determines whether a type is nullable, ie. whether variables of it can be assigned . + + The type to check. + + true if is nullable; otherwise, false. + + + A type is nullable if it is a reference type or a nullable value type. This method returns false only for non-nullable value types. + + + + + Visits a , removing all instances from its + collection and returning objects for them. + + + Note that this visitor does not remove fetch requests from sub-queries. + + + + + Represents a relation collection property that should be eager-fetched by means of a lambda expression. + + + + + Modifies the given query model for fetching, adding an and changing the to + retrieve the result of the . + For example, a fetch request such as FetchMany (x => x.Orders) will be transformed into a selecting + y.Orders (where y is what the query model originally selected) and a selecting the result of the + . + This method is called by in the process of creating the new fetch query model. + + + + + + + + + + + Represents a property holding one object that should be eager-fetched when a query is executed. + + + + + Modifies the given query model for fetching, changing the to the fetch source expression. + For example, a fetch request such as FetchOne (x => x.Customer) will be transformed into a selecting + y.Customer (where y is what the query model originally selected). + This method is called by in the process of creating the new fetch query model. + + + + + + + + + + + Holds a , a for which the fetch request was created, and the position + where the occurred in the list of the . From + this information, it builds a new that represents the as a query. + + + Use to retrieve the instances for a . + + + + + Initializes a new instance of the class. + + The fetch request. + The query model for which the was originally defined. + The result operator position where the was originally located. + The will include all result operators prior to this position into the fetch , + but it will not include any result operators occurring after (or at) that position. + + + + Creates the fetch query model for the , caching the result. + + + A new which represents the same query as but selecting + the objects described by instead of the objects selected by the + . From the original , only those result operators are included that occur + prior to . + + + + + Creates objects for the of the + . Inner fetch requests start from the fetch query model of the outer fetch request, and they have + a of 0. + + An array of objects for the of the + . + + + + Base class for classes representing a property that should be eager-fetched when a query is executed. + + + + + Gets the of the relation member whose contained object(s) should be fetched. + + The relation member. + + + + Gets the inner fetch requests that were issued for this . + + The fetch requests added via . + + + + Gets a the fetch query model, i.e. a new that incorporates a given as a + and selects the fetched items from it. + + A that yields the source items for which items are to be fetched. + A that selects the fetched items from as a subquery. + + This method does not clone the , remove result operatores, etc. Use + (via ) for the full algorithm. + + + + + Modifies the given query model for fetching, adding new instances and changing the + as needed. + This method is called by in the process of creating the new fetch query model. + + The fetch query model to modify. + + + + Gets or adds an inner eager-fetch request for this . + + The to be added. + + or, if another for the same relation member already existed, + the existing . + + + + + Holds a number of instances keyed by the instances representing the relation members + to be eager-fetched. + + + + + Gets or adds an eager-fetch request to this . + + The to be added. + + or, if another for the same relation member already existed, + the existing . + + + + + Provides common functionality used by all expression nodes representing fetch operations. + + + + + Parses query operators that instruct the LINQ provider to fetch a collection-valued relationship starting from the values selected by the query. + The node creates instances and adds them to the as + (unless the already has an equivalent fetch request). + + + This class is not automatically configured for any query operator methods. LINQ provider implementations must explicitly provide and register + these methods with the in order for to be used. + + Sample code for using fluent syntax when specifying fetch requests. + + public static class EagerFetchingExtensionMethods + { + public static FluentFetchRequest<TOriginating, TRelated> FetchMany<TOriginating, TRelated> ( + this IQueryable<TOriginating> query, + Expression<Func<TOriginating, IEnumerable<TRelated>>> relatedObjectSelector) + { + + var methodInfo = ((MethodInfo) MethodBase.GetCurrentMethod ()).MakeGenericMethod (typeof (TOriginating), typeof (TRelated)); + return CreateFluentFetchRequest<TOriginating, TRelated> (methodInfo, query, relatedObjectSelector); + } + + private static FluentFetchRequest<TOriginating, TRelated> CreateFluentFetchRequest<TOriginating, TRelated> ( + MethodInfo currentFetchMethod, + IQueryable<TOriginating> query, + LambdaExpression relatedObjectSelector) + { + var queryProvider = (QueryProviderBase) query.Provider; + var callExpression = Expression.Call (currentFetchMethod, query.Expression, relatedObjectSelector); + return new FluentFetchRequest<TOriginating, TRelated> (queryProvider, callExpression); + } + } + + public class FluentFetchRequest<TQueried, TFetch> : QueryableBase<TQueried> + { + public FluentFetchRequest (IQueryProvider provider, Expression expression) + : base (provider, expression) + { + } + } + + public IQueryParser CreateQueryParser () + { + var customNodeTypeProvider = new MethodInfoBasedNodeTypeRegistry (); + customNodeTypeProvider.Register (new[] { typeof (EagerFetchingExtensionMethods).GetMethod ("FetchMany") }, typeof (FetchManyExpressionNode)); + + var nodeTypeProvider = ExpressionTreeParser.CreateDefaultNodeTypeProvider (); + nodeTypeProvider.InnerProviders.Insert (0, customNodeTypeProvider); + + var transformerRegistry = ExpressionTransformerRegistry.CreateDefault (); + var processor = ExpressionTreeParser.CreateDefaultProcessor (transformerRegistry); + var expressionTreeParser = new ExpressionTreeParser (nodeTypeProvider, processor); + + return new QueryParser (expressionTreeParser); + } + + + + + + + + + + Parses query operators that instruct the LINQ provider to fetch an object-valued relationship starting from the values selected by the query. + The node creates instances and adds them to the as + (unless the already has an equivalent fetch request). + + + This class is not automatically configured for any query operator methods. LINQ provider implementations must explicitly provide and register + these methods with the in order for to be used. + + Sample code for using fluent syntax when specifying fetch requests. + + public static class EagerFetchingExtensionMethods + { + public static FluentFetchRequest<TOriginating, TRelated> FetchOne<TOriginating, TRelated> ( + this IQueryable<TOriginating> query, + Expression<Func<TOriginating, TRelated>> relatedObjectSelector) + { + + var methodInfo = ((MethodInfo) MethodBase.GetCurrentMethod ()).MakeGenericMethod (typeof (TOriginating), typeof (TRelated)); + return CreateFluentFetchRequest<TOriginating, TRelated> (methodInfo, query, relatedObjectSelector); + } + + private static FluentFetchRequest<TOriginating, TRelated> CreateFluentFetchRequest<TOriginating, TRelated> ( + MethodInfo currentFetchMethod, + IQueryable<TOriginating> query, + LambdaExpression relatedObjectSelector) + { + var queryProvider = (QueryProviderBase) query.Provider; + var callExpression = Expression.Call (currentFetchMethod, query.Expression, relatedObjectSelector); + return new FluentFetchRequest<TOriginating, TRelated> (queryProvider, callExpression); + } + } + + public class FluentFetchRequest<TQueried, TFetch> : QueryableBase<TQueried> + { + public FluentFetchRequest (IQueryProvider provider, Expression expression) + : base (provider, expression) + { + } + } + + public IQueryParser CreateQueryParser () + { + var customNodeTypeProvider = new MethodInfoBasedNodeTypeRegistry (); + customNodeTypeProvider.Register (new[] { typeof (EagerFetchingExtensionMethods).GetMethod ("FetchOne") }, typeof (FetchOneExpressionNode)); + + var nodeTypeProvider = ExpressionTreeParser.CreateDefaultNodeTypeProvider (); + nodeTypeProvider.InnerProviders.Insert (0, customNodeTypeProvider); + + var transformerRegistry = ExpressionTransformerRegistry.CreateDefault (); + var processor = ExpressionTreeParser.CreateDefaultProcessor (transformerRegistry); + var expressionTreeParser = new ExpressionTreeParser (nodeTypeProvider, processor); + + return new QueryParser (expressionTreeParser); + } + + + + + + + + + + Provides common functionality for and . + + + + + Provides common functionality for and . + + + + + Parses query operators that instruct the LINQ provider to fetch a collection-valued relationship starting from another fetch operation. The node + creates instances and attaches them to the preceding fetch operation (unless the previous fetch operation already + has an equivalent fetch request). + + + This class is not automatically configured for any query operator methods. LINQ provider implementations must explicitly provide and register + these methods with the in order for to be used. + + Sample code for using fluent syntax when specifying fetch requests. + + public static class EagerFetchingExtensionMethods + { + public static FluentFetchRequest<TQueried, TRelated> ThenFetchMany<TQueried, TFetch, TRelated> ( + this FluentFetchRequest<TQueried, TFetch> query, + Expression<Func<TFetch, IEnumerable<TRelated>>> relatedObjectSelector) + { + + var methodInfo = ((MethodInfo) MethodBase.GetCurrentMethod()).MakeGenericMethod (typeof (TQueried), typeof (TFetch), typeof (TRelated)); + return CreateFluentFetchRequest<TQueried, TRelated> (methodInfo, query, relatedObjectSelector); + } + + private static FluentFetchRequest<TOriginating, TRelated> CreateFluentFetchRequest<TOriginating, TRelated> ( + MethodInfo currentFetchMethod, + IQueryable<TOriginating> query, + LambdaExpression relatedObjectSelector) + { + var queryProvider = (QueryProviderBase) query.Provider; + var callExpression = Expression.Call (currentFetchMethod, query.Expression, relatedObjectSelector); + return new FluentFetchRequest<TOriginating, TRelated> (queryProvider, callExpression); + } + } + + public class FluentFetchRequest<TQueried, TFetch> : QueryableBase<TQueried> + { + public FluentFetchRequest (IQueryProvider provider, Expression expression) + : base (provider, expression) + { + } + } + + public IQueryParser CreateQueryParser () + { + var customNodeTypeProvider = new MethodInfoBasedNodeTypeRegistry (); + customNodeTypeProvider.Register (new[] { typeof (EagerFetchingExtensionMethods).GetMethod ("ThenFetchMany") }, typeof (ThenFetchManyExpressionNode)); + + var nodeTypeProvider = ExpressionTreeParser.CreateDefaultNodeTypeProvider (); + nodeTypeProvider.InnerProviders.Insert (0, customNodeTypeProvider); + + var transformerRegistry = ExpressionTransformerRegistry.CreateDefault (); + var processor = ExpressionTreeParser.CreateDefaultProcessor (transformerRegistry); + var expressionTreeParser = new ExpressionTreeParser (nodeTypeProvider, processor); + + return new QueryParser (expressionTreeParser); + } + + + + + + + + + + Parses query operators that instruct the LINQ provider to fetch an object-valued relationship starting from another fetch operation. The node + creates instances and attaches them to the preceding fetch operation (unless the previous fetch operation already + has an equivalent fetch request). + + + This class is not automatically configured for any query operator methods. LINQ provider implementations must explicitly provide and register + these methods with the in order for to be used. + + Sample code for using fluent syntax when specifying fetch requests. + + public static class EagerFetchingExtensionMethods + { + public static FluentFetchRequest<TQueried, TRelated> ThenFetchOne<TQueried, TFetch, TRelated> ( + this FluentFetchRequest<TQueried, TFetch> query, + Expression<Func<TFetch, TRelated>> relatedObjectSelector) + { + + var methodInfo = ((MethodInfo) MethodBase.GetCurrentMethod()).MakeGenericMethod (typeof (TQueried), typeof (TFetch), typeof (TRelated)); + return CreateFluentFetchRequest<TQueried, TRelated> (methodInfo, query, relatedObjectSelector); + } + + private static FluentFetchRequest<TOriginating, TRelated> CreateFluentFetchRequest<TOriginating, TRelated> ( + MethodInfo currentFetchMethod, + IQueryable<TOriginating> query, + LambdaExpression relatedObjectSelector) + { + var queryProvider = (QueryProviderBase) query.Provider; + var callExpression = Expression.Call (currentFetchMethod, query.Expression, relatedObjectSelector); + return new FluentFetchRequest<TOriginating, TRelated> (queryProvider, callExpression); + } + } + + public class FluentFetchRequest<TQueried, TFetch> : QueryableBase<TQueried> + { + public FluentFetchRequest (IQueryProvider provider, Expression expression) + : base (provider, expression) + { + } + } + + public IQueryParser CreateQueryParser () + { + var customNodeTypeProvider = new MethodInfoBasedNodeTypeRegistry (); + customNodeTypeProvider.Register (new[] { typeof (EagerFetchingExtensionMethods).GetMethod ("ThenFetchOne") }, typeof (ThenFetchOneExpressionNode)); + + var nodeTypeProvider = ExpressionTreeParser.CreateDefaultNodeTypeProvider (); + nodeTypeProvider.InnerProviders.Insert (0, customNodeTypeProvider); + + var transformerRegistry = ExpressionTransformerRegistry.CreateDefault (); + var processor = ExpressionTreeParser.CreateDefaultProcessor (transformerRegistry); + var expressionTreeParser = new ExpressionTreeParser (nodeTypeProvider, processor); + + return new QueryParser (expressionTreeParser); + } + + + + + + + +
+
diff --git a/nhibernateg7/nhibernateg7/bin/Debug/Remotion.Linq.dll b/nhibernateg7/nhibernateg7/bin/Debug/Remotion.Linq.dll new file mode 100644 index 0000000..8166c99 Binary files /dev/null and b/nhibernateg7/nhibernateg7/bin/Debug/Remotion.Linq.dll differ diff --git a/nhibernateg7/nhibernateg7/bin/Debug/Remotion.Linq.xml b/nhibernateg7/nhibernateg7/bin/Debug/Remotion.Linq.xml new file mode 100644 index 0000000..5ae5865 --- /dev/null +++ b/nhibernateg7/nhibernateg7/bin/Debug/Remotion.Linq.xml @@ -0,0 +1,4123 @@ + + + + Remotion.Linq + + + + + Indicates the condition parameter of the assertion method. + The method itself should be marked by attribute. + The mandatory argument of the attribute is the assertion type. + + + + + + Initializes new instance of AssertionConditionAttribute + + Specifies condition type + + + + Gets condition type + + + + + Specifies assertion type. If the assertion method argument satisifes the condition, then the execution continues. + Otherwise, execution is assumed to be halted + + + + + Indicates that the marked parameter should be evaluated to true + + + + + Indicates that the marked parameter should be evaluated to false + + + + + Indicates that the marked parameter should be evaluated to null value + + + + + Indicates that the marked parameter should be evaluated to not null value + + + + + Indicates that the marked method is assertion method, i.e. it halts control flow if one of the conditions is satisfied. + To set the condition, mark one of the parameters with attribute + + + + + + When applied to target attribute, specifies a requirement for any type which is marked with + target attribute to implement or inherit specific type or types + + + + [BaseTypeRequired(typeof(IComponent)] // Specify requirement + public class ComponentAttribute : Attribute + {} + + [Component] // ComponentAttribute requires implementing IComponent interface + public class MyComponent : IComponent + {} + + + + + + Initializes new instance of BaseTypeRequiredAttribute + + Specifies which types are required + + + + Gets enumerations of specified base types + + + + + Indicates that the value of marked element could be null sometimes, so the check for null is necessary before its usage + + + + + Indicates that the value of marked type (or its derivatives) cannot be compared using '==' or '!=' operators. + There is only exception to compare with null, it is permitted + + + + + Describes dependency between method input and output + + +

Function definition table syntax:

+ + FDT ::= FDTRow [;FDTRow]* + FDTRow ::= Input => Output | Output <= Input + Input ::= ParameterName: Value [, Input]* + Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + Value ::= true | false | null | notnull | canbenull + + If method has single input parameter, it's name could be omitted.
+ Using "halt" (or "void"/"nothing", which is the same) for method output means that methos doesn't return normally.
+ "canbenull" annotation is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, or use single attribute with rows separated by semicolon.
+
+ + + [ContractAnnotation("=> halt")] public void TerminationMethod() + [ContractAnnotation("halt <= condition: false")] public void Assert(bool condition, string text) // Regular Assertion method + [ContractAnnotation("s:null => true")] public bool IsNullOrEmpty(string s) // String.IsNullOrEmpty + [ContractAnnotation("null => null; notnull => notnull")] public object Transform(object data) // Method which returns null if parameter is null, and not null if parameter is not null + [ContractAnnotation("s:null=>false; =>true,result:notnull; =>false, result:null")] public bool TryParse(string s, out Person result) + + +
+ + + Only entity marked with attribute considered used + + + + + Indicates implicit assignment to a member + + + + + Indicates implicit instantiation of a type with fixed constructor signature. + That means any unused constructor parameters won't be reported as such. + + + + + Indicates implicit instantiation of a type + + + + + Specify what is considered used implicitly when marked with or + + + + + Members of entity marked with attribute are considered used + + + + + Entity marked with attribute and all its members considered used + + + + + Tells code analysis engine if the parameter is completely handled when the invoked method is on stack. + If the parameter is delegate, indicates that delegate is executed while the method is executed. + If the parameter is enumerable, indicates that it is enumerated while the method is executed. + + + + + Indicates that the function argument should be string literal and match one of the parameters of the caller function. + For example, has such parameter. + + + + + Indicates that method is *pure* linq method, with postponed enumeration. C# iterator methods (yield ...) are always LinqTunnel. + + + + + Indicates that marked element should be localized or not. + + + + + Initializes a new instance of the class with + set to . + + + + + Initializes a new instance of the class. + + true if a element should be localized; otherwise, false. + + + + Returns whether the value of the given object is equal to the current . + + The object to test the value equality of. + + true if the value of the given object is equal to that of the current; otherwise, false. + + + + + Returns the hash code for this instance. + + A hash code for the current . + + + + Gets a value indicating whether a element should be localized. + true if a element should be localized; otherwise, false. + + + + + Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes as unused (as well as by other usage inspections) + + + + + Gets value indicating what is meant to be used + + + + + Indicates that IEnumarable, passed as parameter, is not enumerated. + + + + + + Indicates that the function is used to notify class type property value is changed. + + + + + Indicates that the value of marked element could never be null + + + + + This attribute is intended to mark publicly available API which should not be removed and so is treated as used. + + + + + Indicates that method doesn't contain observable side effects. + + + + + Indicates that marked method builds string by format pattern and (optional) arguments. + Parameter, which contains format string, should be given in constructor. + The format string should be in -like form + + + + + Initializes new instance of StringFormatMethodAttribute + + Specifies which parameter of an annotated method should be treated as format-string + + + + Gets format parameter name + + + + + Indicates that the marked method unconditionally terminates control flow execution. + For example, it could unconditionally throw exception + + + + + Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + so this symbol will not be marked as unused (as well as by other usage inspections) + + + + + Gets value indicating what is meant to be used + + + + + This utility class provides methods for checking arguments. + + + Some methods of this class return the value of the parameter. In some cases, this is useful because the value will be converted to another + type: + ("o", o); + } + ]]> + In some other cases, the input value is returned unmodified. This makes it easier to use the argument checks in calls to base class constructors + or property setters: + + + + + Returns the value itself if it is not and of the specified value type. + The type that must have. + The is a . + The is an instance of another type. + + + Checks of the is of the . + The is a . + The is an instance of another type. + + + Returns the value itself if it is of the specified type. + The type that must have. + + is an instance of another type (which is not a subtype of ). + + is null and cannot be null. + + For non-nullable value types, you should use either or pass the type + instead. + + + + Checks whether is not and can be assigned to . + The is . + The cannot be assigned to . + + + Checks whether can be assigned to . + The cannot be assigned to . + + + Checks whether can be assigned to . + The cannot be assigned to . + + + Checks whether all items in are of type or a null reference. + If at least one element is not of the specified type or a derived type. + + + Checks whether all items in are of type and not null references. + If at least one element is not of the specified type or a derived type. + If at least one element is a null reference. + + + + Provides methods that throw an if an assertion fails. + + + + This class contains methods that are conditional to the DEBUG and TRACE attributes ( and ). + + Note that assertion expressions passed to these methods are not evaluated (read: executed) if the respective symbol are not defined during + compilation, nor are the methods called. This increases performance for production builds, but make sure that your assertion expressions do + not cause any side effects! See or and the for more information + about conditional compilation. + + Assertions are no replacement for checking input parameters of public methods (see ). + + + + + + Determines whether a type is nullable, ie. whether variables of it can be assigned . + + The type to check. + + true if is nullable; otherwise, false. + + + A type is nullable if it is a reference type or a nullable value type. This method returns false only for non-nullable value types. + + + + + Represents a data source in a query that adds new data items in addition to those provided by the . + + + In C#, the second "from" clause in the following sample corresponds to an : + + var query = from s in Students + from f in s.Friends + select f; + + + + + + Base class for and . + + + + + + Common interface for from clauses ( and ). From clauses define query sources that + provide data items to the query which are filtered, ordered, projected, or otherwise processed by the following clauses. + + + + + Represents a clause within the . Implemented by , , + , and . + + + + + Transforms all the expressions in this clause and its child objects via the given delegate. + + The transformation object. This delegate is called for each within this + clause, and those expressions will be replaced with what the delegate returns. + + + + Represents a clause or result operator that generates items which are streamed to the following clauses or operators. + + + + + Gets the name of the items generated by this . + + + Item names are inferred when a query expression is parsed, and they usually correspond to the variable names present in that expression. + However, note that names are not necessarily unique within a . Use names only for readability and debugging, not for + uniquely identifying objects. To match an with its references, use the + property rather than the . + + + + + Gets the type of the items generated by this . + + + + + Copies the 's attributes, i.e. the , , and + . + + + + + + The expression generating the data items for this from clause. + + + + + Initializes a new instance of the class. + + A name describing the items generated by the from clause. + The type of the items generated by the from clause. + The generating data items for this from clause. + + + + Transforms all the expressions in this clause and its child objects via the given delegate. + + The transformation object. This delegate is called for each within this + clause, and those expressions will be replaced with what the delegate returns. + + + + Gets or sets a name describing the items generated by this from clause. + + + Item names are inferred when a query expression is parsed, and they usually correspond to the variable names present in that expression. + However, note that names are not necessarily unique within a . Use names only for readability and debugging, not for + uniquely identifying objects. To match an with its references, use the + property rather than the . + + + + + Gets or sets the type of the items generated by this from clause. + + + Changing the of a can make all objects that + point to that invalid, so the property setter should be used with care. + + + + + The expression generating the data items for this from clause. + + + + + Represents a clause in a 's collection. Body clauses take the items generated by + the , filtering (), ordering (), augmenting + (), or otherwise processing them before they are passed to the . + + + + + Accepts the specified visitor by calling one of its Visit... methods. + + The visitor to accept. + The query model in whose context this clause is visited. + The index of this clause in the 's collection. + + + + Clones this clause, registering its clone with the if it is a query source clause. + + The clones of all query source clauses are registered with this . + A clone of this clause. + + + + Initializes a new instance of the class. + + A name describing the items generated by the from clause. + The type of the items generated by the from clause. + The generating the items of this from clause. + + + + Accepts the specified visitor by calling its method. + + The visitor to accept. + The query model in whose context this clause is visited. + The index of this clause in the 's collection. + + + + Clones this clause, registering its clone with the . + + The clones of all query source clauses are registered with this . + A clone of this clause. + + + + Aggregates all objects needed in the process of cloning a and its clauses. + + + + + Gets the clause mapping used during the cloning process. This is used to adjust the instances + of clauses to point to clauses in the cloned . + + + + + This interface should be implemented by visitors that handle the instances. + + + + + This interface should be implemented by visitors that handle VB-specific expressions. + + + + + Wraps an exception whose partial evaluation caused an exception. + + + + When encounters an exception while evaluating an independent expression subtree, it + will wrap the subtree within a . The wrapper contains both the + instance and the that caused the exception. + + + To explicitly support this expression type, implement . + To ignore this wrapper and only handle the inner , call the method and visit the result. + + + Subclasses of that do not implement will, + by default, automatically reduce this expression type to the in the + method. + + + Subclasses of that do not implement will, + by default, ignore this expression and visit its child expressions via the and + methods. + + + + + + Represents an expression tree node that points to a query source represented by a . These expressions should always + point back, to a clause defined prior to the clause holding a . Otherwise, exceptions might be + thrown at runtime. + + + This particular expression overrides , i.e. it can be compared to another based + on the . + + + + + Determines whether the specified is equal to the current by + comparing the properties for reference equality. + + The to compare with the current . + + if the specified is a that points to the + same ; otherwise, false. + + + + + Gets the query source referenced by this expression. + + The referenced query source. + + + + Represents an that holds a subquery. The subquery is held by in its parsed form. + + + + + Represents a VB-specific comparison expression. + + + + To explicitly support this expression type, implement . + To treat this expression as if it were an ordinary , call its method and visit the result. + + + Subclasses of that do not implement will, by default, + automatically reduce this expression type to in the method. + + + Subclasses of that do not implement will, by default, + ignore this expression and visit its child expressions via the and + methods. + + + + + + Constructs a that is able to extract a specific simple expression from a complex + or . + + + + For example, consider the task of determining the value of a specific query source [s] from an input value corresponding to a complex + expression. This will return a able to perform this task. + + + + If the complex expression is [s], it will simply return input => input. + If the complex expression is new { a = [s], b = "..." }, it will return input => input.a. + If the complex expression is new { a = new { b = [s], c = "..." }, d = "..." }, it will return input => input.a.b. + + + + + + + Provides a base class for expression visitors used with re-linq, adding support for and . + + + + + Adjusts the arguments for a so that they match the given members. + + The arguments to adjust. + The members defining the required argument types. + + A sequence of expressions that are equivalent to , but converted to the associated member's + result type if needed. + + + + + Constructs a that is able to extract a specific simple from a + complex . + + The expression an accessor to which should be created. + The full expression containing the . + The input parameter to be used by the resulting lambda. Its type must match the type of . + The compares the via reference equality, + which means that exactly the same expression reference must be contained by for the visitor to return the + expected result. In addition, the visitor can only provide accessors for expressions nested in or + . + A acting as an accessor for the when an input matching + is given. + + + + + Takes an expression and replaces all instances, as defined by a given . + This is used whenever references to query sources should be replaced by a transformation. + + + + + Takes an expression and replaces all instances, as defined by a given + . + + The expression to be scanned for references. + The clause mapping to be used for replacing instances. + If , the visitor will throw an exception when + not mapped in the is encountered. If , + the visitor will ignore such expressions. + An expression with its instances replaced as defined by the + . + + + + Performs a reverse operation, i.e. creates a from a given resolved expression, + substituting all objects by getting the referenced objects from the lambda's input parameter. + + + Given the following input: + + ItemExpression: new AnonymousType ( a = [s1], b = [s2] ) + ResolvedExpression: [s1].ID + [s2].ID + + The visitor generates the following : input => input.a.ID + input.b.ID + The lambda's input parameter has the same type as the ItemExpression. + + + + + Performs a reverse operation, i.e. creates a from a given resolved expression, + substituting all objects by getting the referenced objects from the lambda's input parameter. + + The item expression representing the items passed to the generated via its input + parameter. + The resolved expression for which to generate a reverse resolved . + A from the given resolved expression, substituting all + objects by getting the referenced objects from the lambda's input parameter. The generated has exactly one + parameter which is of the type defined by . + + + + Performs a reverse operation on a , i.e. creates a new + with an additional parameter from a given resolved , + substituting all objects by getting the referenced objects from the new input parameter. + + The item expression representing the items passed to the generated via its new + input parameter. + The resolved for which to generate a reverse resolved . + The position at which to insert the new parameter. + A similar to the given resolved expression, substituting all + objects by getting the referenced objects from an additional input parameter. The new input parameter is of the type defined by + . + + + + Represents the join part of a query, adding new data items and joining them with data items from previous clauses. In contrast to + , the does not provide access to the individual items of the joined query source. + Instead, it provides access to all joined items for each item coming from the previous clauses, thus grouping them together. The semantics + of this join is so that for all input items, a joined sequence is returned. That sequence can be empty if no joined items are available. + + + In C#, the "into" clause in the following sample corresponds to a . The "join" part before that is encapsulated + as a held in . The adds a new query source to the query + ("addresses"), but the item type of that query source is , not "Address". Therefore, it can be + used in the of an to extract the single items. + + var query = from s in Students + join a in Addresses on s.AdressID equals a.ID into addresses + from a in addresses + select new { s, a }; + + + + + + Transforms all the expressions in this clause and its child objects via the given delegate. + + The transformation object. This delegate is called for each within this + clause, and those expressions will be replaced with what the delegate returns. + + + + Accepts the specified visitor by calling its method. + + The visitor to accept. + The query model in whose context this clause is visited. + The index of this clause in the 's collection. + + + + Clones this clause, registering its clone with the . + + The clones of all query source clauses are registered with this . + A clone of this clause. + + + + Gets or sets a name describing the items generated by this . + + + Item names are inferred when a query expression is parsed, and they usually correspond to the variable names present in that expression. + However, note that names are not necessarily unique within a . Use names only for readability and debugging, not for + uniquely identifying objects. To match an with its references, use the + property rather than the . + + + + + Gets or sets the type of the items generated by this . This must implement . + + + Changing the of a can make all objects that + point to that invalid, so the property setter should be used with care. + + + + + Gets or sets the inner join clause of this . The represents the actual join operation + performed by this clause; its results are then grouped by this clause before streaming them to subsequent clauses. + objects outside the must not point to + because the items generated by it are only available in grouped form from outside this clause. + + + + + Represents the join part of a query, adding new data items and joining them with data items from previous clauses. This can either + be part of or of . The semantics of the + is that of an inner join, i.e. only combinations where both an input item and a joined item exist are returned. + + + In C#, the "join" clause in the following sample corresponds to a . The adds a new + query source to the query, selecting addresses (called "a") from the source "Addresses". It associates addresses and students by + comparing the students' "AddressID" properties with the addresses' "ID" properties. "a" corresponds to and + , "Addresses" is and the left and right side of the "equals" operator are held by + and , respectively: + + var query = from s in Students + join a in Addresses on s.AdressID equals a.ID + select new { s, a }; + + + + + + Initializes a new instance of the class. + + A name describing the items generated by this . + The type of the items generated by this . + The expression that generates the inner sequence, i.e. the items of this . + An expression that selects the left side of the comparison by which source items and inner items are joined. + An expression that selects the right side of the comparison by which source items and inner items are joined. + + + + Accepts the specified visitor by calling its + method. + + The visitor to accept. + The query model in whose context this clause is visited. + The index of this clause in the 's collection. + + + + Accepts the specified visitor by calling its + method. This overload is used when visiting a that is held by a . + + The visitor to accept. + The query model in whose context this clause is visited. + The holding this instance. + + + + Clones this clause, registering its clone with the . + + The clones of all query source clauses are registered with this . + A clone of this clause. + + + + Transforms all the expressions in this clause and its child objects via the given delegate. + + The transformation object. This delegate is called for each within this + clause, and those expressions will be replaced with what the delegate returns. + + + + Gets or sets the type of the items generated by this . + + + Changing the of a can make all objects that + point to that invalid, so the property setter should be used with care. + + + + + Gets or sets a name describing the items generated by this . + + + Item names are inferred when a query expression is parsed, and they usually correspond to the variable names present in that expression. + However, note that names are not necessarily unique within a . Use names only for readability and debugging, not for + uniquely identifying objects. To match an with its references, use the + property rather than the . + + + + + Gets or sets the inner sequence, the expression that generates the inner sequence, i.e. the items of this . + + The inner sequence. + + + + Gets or sets the outer key selector, an expression that selects the right side of the comparison by which source items and inner items are joined. + + The outer key selector. + + + + Gets or sets the inner key selector, an expression that selects the left side of the comparison by which source items and inner items are joined. + + The inner key selector. + + + + Represents the main data source in a query, producing data items that are filtered, aggregated, projected, or otherwise processed by + subsequent clauses. + + + In C#, the first "from" clause in the following sample corresponds to the : + + var query = from s in Students + from f in s.Friends + select f; + + + + + + Initializes a new instance of the class. + + A name describing the items generated by the from clause. + The type of the items generated by the from clause. + The generating data items for this from clause. + + + + Accepts the specified visitor by calling its method. + + The visitor to accept. + The query model in whose context this clause is visited. + + + + Clones this clause, registering its clone with the . + + The clones of all query source clauses are registered with this . + A clone of this clause. + + + + Represents the orderby part of a query, ordering data items according to some . + + + In C#, the whole "orderby" clause in the following sample (including two orderings) corresponds to an : + + var query = from s in Students + orderby s.Last, s.First + select s; + + + + + + Initializes a new instance of the class. + + + + + Accepts the specified visitor by calling its method. + + The visitor to accept. + The query model in whose context this clause is visited. + The index of this clause in the 's collection. + + + + Transforms all the expressions in this clause and its child objects via the given delegate. + + The transformation object. This delegate is called for each within this + clause, and those expressions will be replaced with what the delegate returns. + + + + Clones this clause. + + The clones of all query source clauses are registered with this . + A clone of this clause. + + + + Gets the instances that define how to sort the items coming from previous clauses. The order of the + in the collection defines their priorities. For example, { LastName, FirstName } would sort all items by + LastName, and only those items that have equal LastName values would be sorted by FirstName. + + + + + Represents a single ordering instruction in an . + + + + + Initializes a new instance of the class. + + The expression used to order the data items returned by the query. + The to use for sorting. + + + + Accepts the specified visitor by calling its method. + + The visitor to accept. + The query model in whose context this clause is visited. + The in whose context this item is visited. + The index of this item in the 's collection. + + + + Clones this item. + + The clones of all query source clauses are registered with this . + A clone of this item. + + + + Transforms all the expressions in this item via the given delegate. + + The transformation object. This delegate is called for each within this + item, and those expressions will be replaced with what the delegate returns. + + + + Gets or sets the expression used to order the data items returned by the query. + + The expression. + + + + Gets or sets the direction to use for ordering data items. + + + + + Specifies the direction used to sort the result items in a query using an . + + + + + Sorts the items in an ascending way, from smallest to largest. + + + + + Sorts the items in an descending way, from largest to smallest. + + + + + Maps instances to instances. This is used by + in order to be able to correctly update references to old clauses to point to the new clauses. Via + , it can also be used manually. + + + + + Represents an operation that is executed on the result set of the query, aggregating, filtering, or restricting the number of result items + before the query result is returned. + + + + + Executes this result operator in memory, on a given input. Executing result operators in memory should only be + performed if the target query system does not support the operator. + + The input for the result operator. This must match the type of expected by the operator. + The result of the operator. + + + + Gets information about the data streamed out of this . This contains the result type a query would have if + it ended with this , and it optionally includes an describing + the streamed sequence's items. + + Information about the data produced by the preceding , or the + of the query if no previous exists. + Gets information about the data streamed out of this . + + + + Clones this item, registering its clone with the if it is a query source clause. + + The clones of all query source clauses are registered with this . + A clone of this item. + + + + Accepts the specified visitor by calling its method. + + The visitor to accept. + The query model in whose context this clause is visited. + The index of this item in the 's collection. + + + + Transforms all the expressions in this item via the given delegate. Subclasses must apply the + to any expressions they hold. If a subclass does not hold any expressions, it shouldn't do anything + in the implementation of this method. + + The transformation object. This delegate is called for each within this + item, and those expressions will be replaced with what the delegate returns. + + + + Invokes the given via reflection on the given . + + The input to invoke the method with. + The method to be invoked. + The result of the invocation + + + + Gets the constant value of the given expression, assuming it is a . If it is + not, an is thrown. + + The expected value type. If the value is not of this type, an is thrown. + A string describing the value; this will be included in the exception message if an exception is thrown. + The expression whose value to get. + + The constant value of the given . + + + + + Represents aggregating the items returned by a query into a single value with an initial seeding value. + This is a result operator, operating on the whole result set of a query. + + + In C#, the "Aggregate" call in the following example corresponds to an . + + var result = (from s in Students + select s).Aggregate(0, (totalAge, s) => totalAge + s.Age); + + + + + + Represents a that is executed on a sequence, returning a scalar value or single item as its result. + + + + + Initializes a new instance of the class. + + The seed expression. + The aggregating function. This is a taking a parameter that represents the value accumulated so + far and returns a new accumulated value. This is a resolved expression, i.e. items streaming in from prior clauses and result operators + are represented as expressions containing nodes. + The result selector, can be . + + + + Gets the constant value of the property, assuming it is a . If it is + not, an is thrown. + + The expected seed type. If the item is not of this type, an is thrown. + The constant value of the property. + + + + + + + Executes the aggregating operation in memory. + + The type of the source items. + The type of the aggregated items. + The type of the result items. + The input sequence. + A object holding the aggregated value. + + + + + + + + + + + + + Gets or sets the aggregating function. This is a taking a parameter that represents the value accumulated so + far and returns a new accumulated value. This is a resolved expression, i.e. items streaming in from prior clauses and result operators + are represented as expressions containing nodes. + + The aggregating function. + + + + Gets or sets the seed of the accumulation. This is an denoting the starting value of the aggregation. + + The seed of the accumulation. + + + + Gets or sets the result selector. This is a applied after the aggregation to select the final value. + Can be . + + The result selector. + + + + Represents aggregating the items returned by a query into a single value. The first item is used as the seeding value for the aggregating + function. + This is a result operator, operating on the whole result set of a query. + + + In C#, the "Aggregate" call in the following example corresponds to an . + + var result = (from s in Students + select s.Name).Aggregate((allNames, name) => allNames + " " + name); + + + + + + Initializes a new instance of the class. + + The aggregating function. This is a taking a parameter that represents the value accumulated so + far and returns a new accumulated value. This is a resolved expression, i.e. items streaming in from prior clauses and result operators + are represented as expressions containing nodes. + + + + + + + + + + + + + + + + Gets or sets the aggregating function. This is a taking a parameter that represents the value accumulated so + far and returns a new accumulated value. This is a resolved expression, i.e. items streaming in from prior clauses and result operators + are represented as expressions containing nodes. + + The aggregating function. + + + + Represents a check whether all items returned by a query satisfy a predicate. + This is a result operator, operating on the whole result set of a query. + + + In C#, the "All" call in the following example corresponds to an . + + var result = (from s in Students + select s).All(); + + + + + + Initializes a new instance of the class. + + The predicate to evaluate. This is a resolved version of the body of the that would be + passed to . + + + + + + + + + + + + + + + + + + + Gets or sets the predicate to evaluate on all items in the sequence. + This is a resolved version of the body of the that would be + passed to . + + The predicate. + + + + Represents a check whether any items are returned by a query. + This is a result operator, operating on the whole result set of a query. + + + "Any" query methods taking a predicate are represented as into a combination of a and an + . + + + In C#, the "Any" call in the following example corresponds to an . + + var result = (from s in Students + select s).Any(); + + + + + + + + + + + + + + + + + + + + + Represents the transformation of a sequence to a query data source. + This is a result operator, operating on the whole result set of a query. + + + In C#, the "AsQueryable" call in the following example corresponds to a . + + var query = (from s in Students + select s).AsQueryable(); + + + + + + Represents a that is executed on a sequence, returning a new sequence with the same + item type as its result. + + + + + Represents a that is executed on a sequence, returning a new sequence as its result. + + + + + Initializes a new instance of the . + + + + + A marker interface that must be implemented by the if the visitor supports the . + + + Note that the interface will become obsolete with v3.0.0. See also RMLNQ-117. + + + + + Represents a calculation of an average value from the items returned by a query. + This is a result operator, operating on the whole result set of a query. + + + In C#, the "Average" call in the following example corresponds to an . + + var query = (from s in Students + select s.ID).Average(); + + + + + + + + + Represents a cast of the items returned by a query to a different type. + This is a result operator, operating on the whole result set of a query. + + + In C#, "Cast" call in the following example corresponds to a . + + var query = (from s in Students + select s.ID).Cast<int>(); + + + + + + + + + Represents a that is executed on a sequence, choosing a single item for its result. + + + + + Represents concatenating the items returned by a query with a given set of items, similar to the but + retaining duplicates (and order). + This is a result operator, operating on the whole result set of a query. + + + In C#, the "Concat" call in the following example corresponds to a . + + var query = (from s in Students + select s).Concat(students2); + + + + + + Gets the value of , assuming holds a . If it doesn't, + an is thrown. + + The constant value of . + + + + Gets or sets the second source of this result operator, that is, an enumerable containing the items concatenated with the input sequence. + + + + + Represents a check whether the results returned by a query contain a specific item. + This is a result operator, operating on the whole result set of a query. + + + In C#, the "Contains" call in the following example corresponds to a . + + var query = (from s in Students + select s).Contains (student); + + + + + + Initializes a new instance of the class. + + The item for which to be searched. + + + + Gets the constant value of the property, assuming it is a . If it is + not, an is thrown. + + The expected item type. If the item is not of this type, an is thrown. + The constant value of the property. + + + + Gets or sets an expression yielding the item for which to be searched. This must be compatible with (ie., assignable to) the source sequence + items. + + The item expression. + + + + Represents counting the number of items returned by a query. + This is a result operator, operating on the whole result set of a query. + + + "Count" query methods taking a predicate are represented as a combination of a and a . + /// + In C#, the "Count" call in the following example corresponds to a . + + var query = (from s in Students + select s).Count(); + + + + + + + + + Represents a guard clause yielding a singleton sequence with a default value if no items are returned by a query. + This is a result operator, operating on the whole result set of a query. + + + In C#, the "Defaultifempty" call in the following example corresponds to a . + + var query = (from s in Students + select s).DefaultIfEmpty ("student"); + + + + + + Gets the constant value of the property, assuming it is a . If it is + not, an is thrown. If it is , is returned. + + The constant value of the property. + + + + Gets or sets the optional default value. + + The optional default value. + + + + Represents the removal of duplicate values from the items returned by a query. + This is a result operator, operating on the whole result set of a query. + + + In C#, the "Distinct" call in the following example corresponds to a . + + var query = (from s in Students + select s).Distinct(); + + + + + + + + + Represents the removal of a given set of items from the result set of a query. + This is a result operator, operating on the whole result set of a query. + + + In C#, the "Except" call in the following example corresponds to a . + + var query = (from s in Students + select s).Except(students2); + + + + + + Gets the value of , assuming holds a . If it doesn't, + an is thrown. + + The constant value of . + + + + Gets or sets the second source of this result operator, that is, an enumerable containing the items removed from the input sequence. + + + + + Represents taking only the first of the items returned by a query. + This is a result operator, operating on the whole result set of a query. + + + "First" query methods taking a predicate are represented as a combination of a and a . + + + In C#, the "First" call in the following example corresponds to a . + + var query = (from s in Students + select s).First(); + + + + + + Initializes a new instance of the . + + The flag defines if a default expression should be regarded. + + + + + + + Represents grouping the items returned by a query according to some key retrieved by a , applying by an + to the grouped items. This is a result operator, operating on the whole result set of the query. + + + In C#, the "group by" clause in the following sample corresponds to a . "s" (a reference to the query source + "s", see ) is the expression, "s.Country" is the + expression: + + var query = from s in Students + where s.First == "Hugo" + group s by s.Country; + + + + + + Initializes a new instance of the class. + + A name associated with the items generated by the result operator. + The selector retrieving the key by which to group items. + The selector retrieving the elements to group. + + + + Clones this clause, adjusting all instances held by it as defined by + . + + The clones of all query source clauses are registered with this . + A clone of this clause. + + + + Transforms all the expressions in this clause and its child objects via the given delegate. + + The transformation object. This delegate is called for each within this + clause, and those expressions will be replaced with what the delegate returns. + + + + Gets or sets the name of the items generated by this . + + + Item names are inferred when a query expression is parsed, and they usually correspond to the variable names present in that expression. + However, note that names are not necessarily unique within a . Use names only for readability and debugging, not for + uniquely identifying objects. To match an with its references, use the + property rather than the . + + + + + Gets or sets the type of the items generated by this . The item type is an instantiation of + derived from the types of and . + + + + + Gets or sets the selector retrieving the key by which to group items. + This is a resolved version of the body of the that would be + passed to . + + The key selector. + + + + Gets or sets the selector retrieving the elements to group. + This is a resolved version of the body of the that would be + passed to . + + The element selector. + + + + Represents taking the mathematical intersection of a given set of items and the items returned by a query. + This is a result operator, operating on the whole result set of a query. + + + In C#, the "Intersect" call in the following example corresponds to a . + + var query = (from s in Students + select s).Intersect(students2); + + + + + + Gets the value of , assuming holds a . If it doesn't, + an is thrown. + + The constant value of . + + + + Gets or sets the second source of this result operator, that is, an enumerable containing the items intersected with the input sequence. + + + + + Represents taking only the last one of the items returned by a query. + This is a result operator, operating on the whole result set of a query. + + + "Last" query methods taking a predicate are represented as a combination of a and a . + + + In C#, the "Last" call in the following example corresponds to a . + + var query = (from s in Students + select s).Last(); + + + + + + Initializes a new instance of the . + + The flag defines if a default expression should be regarded. + + + + + + + Represents counting the number of items returned by a query as a 64-bit number. + This is a result operator, operating on the whole result set of a query. + + + "LongCount" query methods taking a predicate are represented as a combination of a and a + . + + + In C#, the "LongCount" call in the following example corresponds to a . + + var query = (from s in Students + select s).LongCount(); + + + + + + + + + Represents taking only the greatest one of the items returned by a query. + This is a result operator, operating on the whole result set of a query. + + + The semantics of "greatest" are defined by the query provider. "Max" query methods taking a selector are represented as a combination + of a and a . + + + In C#, the "Max" call in the following example corresponds to a . + + var query = (from s in Students + select s.ID).Max(); + + + + + + Initializes a new instance of the . + + + + + + + + Represents taking only the smallest one of the items returned by a query. + This is a result operator, operating on the whole result set of a query. + + + The semantics of "smallest" are defined by the query provider. "Min" query methods taking a selector are represented as a combination + of a and a . + + + In C#, the "Min" call in the following example corresponds to a . + + var query = (from s in Students + select s.ID).Min(); + + + + + + Initializes a new instance of the . + + + + + + + + Represents filtering the items returned by a query to only return those items that are of a specific type. + This is a result operator, operating on the whole result set of a query. + + + In C#, the "OfType" call in the following example corresponds to a . + + var query = (from s in Students + select s.ID).OfType<int>(); + + + + + + + + + Represents reversing the sequence of items returned by of a query. + This is a result operator, operating on the whole result set of a query. + + + In C#, the "Reverse" call in the following example corresponds to a . + + var query = (from s in Students + select s).Reverse(); + + + + + + + + + Represents taking the single item returned by a query. + This is a result operator, operating on the whole result set of a query. + + + In C#, the "Single" call in the following example corresponds to a . + + var query = (from s in Students + select s).Single(); + + + + + + Initializes a new instance of the . + + The flag defines if a default expression should be regarded. + + + + + + + Represents skipping a number of the items returned by a query. + This is a result operator, operating on the whole result set of a query. + + + In C#, the "Skip" call in the following example corresponds to a . + + var query = (from s in Students + select s).Skip (3); + + + + + + Gets the constant value of the property, assuming it is a . If it is + not, an is thrown. + + The constant value of the property. + + + + Represents calculating the sum of the items returned by a query. + This is a result operator, operating on the whole result set of a query. + + + In C#, the "Sum" call in the following example corresponds to a . + + var query = (from s in Students + select s.ID).Sum(); + + + + + + + + + Represents taking only a specific number of items returned by a query. + This is a result operator, operating on the whole result set of a query. + + + In C#, the "Take" call in the following example corresponds to a . + + var query = (from s in Students + select s).Take(3); + + + + + + Initializes a new instance of the . + + The number of elements which should be returned. + + + + Gets the constant value of the property, assuming it is a . If it is + not, an is thrown. + + The constant value of the property. + + + + Represents forming the mathematical union of a given set of items and the items returned by a query. + This is a result operator, operating on the whole result set of a query. + + + In C#, the "Union" call in the following example corresponds to a . + + var query = (from s in Students + select s).Union(students2); + + + + + + Gets the value of , assuming holds a . If it doesn't, + an is thrown. + + The constant value of . + + + + Gets or sets the second source of this result operator, that is, an enumerable containing the items united with the input sequence. + + + + + Represents the select part of a query, projecting data items according to some . + + + In C#, the "select" clause in the following sample corresponds to a . "s" (a reference to the query source "s", see + ) is the expression: + + var query = from s in Students + where s.First == "Hugo" + select s; + + + + + + Initializes a new instance of the class. + + The selector that projects the data items. + + + + Accepts the specified visitor by calling its method. + + The visitor to accept. + The query model in whose context this clause is visited. + + + + Clones this clause. + + The clones of all query source clauses are registered with this . + A clone of this clause. + + + + Transforms all the expressions in this clause and its child objects via the given delegate. + + The transformation object. This delegate is called for each within this + clause, and those expressions will be replaced with what the delegate returns. + + + + Gets an object describing the data streaming out of this . If a query ends with + the , this corresponds to the query's output data. If a query has , the data + is further modified by those operators. Use to obtain the real result type of + a query model, including the . + + Gets a object describing the data streaming out of this . + + The data streamed from a is always of type instantiated + with the type of as its generic parameter. Its corresponds to the + . + + + + + Gets the selector defining what parts of the data items are returned by the query. + + + + + Holds the data needed to represent the output or input of a part of a query in memory. This is mainly used for + . The data held by implementations of this interface can be either a value or a sequence. + + + + + Gets an object describing the data held by this instance. + + An object describing the data held by this instance. + + + + Gets the value held by this instance. + + The value. + + + + Describes the data streamed out of a or . + + + + + Executes the specified with the given , calling either + or , depending on the type of data streamed + from this interface. + + The query model to be executed. + The executor to use. + An object holding the results of the query execution. + + + + Returns a new of the same type as this instance, but with a new . + + The type to use for the property. The type must be compatible with the data described by this + , otherwise an exception is thrown. + The type may be a generic type definition if the supports generic types; in this case, + the type definition is automatically closed with generic parameters to match the data described by this . + A new of the same type as this instance, but with a new . + The is not compatible with the data described by this + . + + + + Gets the type of the data described by this instance. For a sequence, this is a type implementing + , where T is instantiated with a concrete type. For a single value, this is the value type. + + + + + Describes a scalar value streamed out of a or . A scalar value corresponds to a + value calculated from the result set, as produced by or , for instance. + + + + + Describes a single or scalar value streamed out of a or . + + + + + + + + Returns a new instance of the same type with a different . + + The new data type. + The cannot be used for the clone. + A new instance of the same type with the given . + + + + + + + Gets the type of the data described by this instance. This is the type of the streamed value, or + if the value is . + + + + + Holds the data needed to represent the output or input of a part of a query in memory. This is mainly used for + . The data consists of a sequence of items. + + + + + Initializes a new instance of the class, setting the and + properties. + + The sequence. + An instance of describing the sequence. + + + + Gets the current sequence held by this object as well as an describing the + sequence's items, throwing an exception if the object does not hold a sequence of items of type . + + The expected item type of the sequence. + + The sequence and an describing its items. + + Thrown when the item type is not the expected type . + + + + Gets the current sequence for the operation. If the object is used as input, this + holds the input sequence for the operation. If the object is used as output, this holds the result of the operation. + + The current sequence. + + + + Describes sequence data streamed out of a or . Sequence data can be held by an object + implementing , and its items are described via a . + + + + + Returns a new with an adjusted . + + The type to use for the property. The type must be convertible from the previous type, otherwise + an exception is thrown. The type may be a generic type definition; in this case, + the type definition is automatically closed with the type of the . + + A new with a new . + + The is not compatible with the items described by this + . + + + + Gets the type of the items returned by the sequence described by this object, as defined by . Note that because + is covariant starting from .NET 4.0, this may be a more abstract type than what's returned by + 's property. + + + + + Gets an expression that describes the structure of the items held by the sequence described by this object. + + The expression for the sequence's items. + + + + Gets the type of the data described by this instance. This is a type implementing + , where T is instantiated with a concrete type. + + + + + Describes a single value streamed out of a or . A single value corresponds to one + item from the result set, as produced by or , for instance. + + + + + Holds the data needed to represent the output or input of a part of a query in memory. This is mainly used for + . The data is a single, non-sequence value and can only be consumed by result operators + working with single values. + + + + + Initializes a new instance of the class, setting the and properties. + + The value. + A describing the value. + + + + Gets the value held by , throwing an exception if the value is not of type . + + The expected type of the value. + , cast to . + Thrown when if not of the expected type. + + + + Gets an object describing the data held by this instance. + + + An object describing the data held by this instance. + + + + + Gets the current value for the operation. If the object is used as input, this + holds the input value for the operation. If the object is used as output, this holds the result of the operation. + + The current value. + + + + Represents the where part of a query, filtering data items according to some . + + + In C#, the "where" clause in the following sample corresponds to a : + + var query = from s in Students + where s.First == "Hugo" + select s; + + + + + + Initializes a new instance of the class. + + The predicate used to filter data items. + + + + Accepts the specified visitor by calling its method. + + The visitor to accept. + The query model in whose context this clause is visited. + The index of this clause in the 's collection. + + + + Transforms all the expressions in this clause and its child objects via the given delegate. + + The transformation object. This delegate is called for each within this + clause, and those expressions will be replaced with what the delegate returns. + + + + Clones this clause. + + The clones of all query source clauses are registered with this . + + + + + Gets the predicate, the expression representing the where condition by which the data items are filtered + + + + + Provides a way to enumerate an while items are inserted, removed, or cleared in a consistent fashion. + + The element type of the . + + This class subscribes to the event exposed by + and reacts on changes to the collection. If an item is inserted or removed before the current element, the enumerator will continue after + the current element without regarding the new or removed item. If the current item is removed, the enumerator will continue with the item that + previously followed the current item. If an item is inserted or removed after the current element, the enumerator will simply continue, + including the newly inserted item and not including the removed item. If an item is moved or replaced, the enumeration will also continue + with the item located at the next position in the sequence. + + + + + Represents an item enumerated by . This provides access + to the as well as the of the enumerated item. + + + + + Gets the index of the current enumerated item. Can only be called while enumerating, afterwards, it will throw an + . If an item is inserted into or removed from the collection before the current item, this + index will change. + + + + + Gets the value of the current enumerated item. Can only be called while enumerating, afterwards, it will throw an + . + + The value. + + + + Defines extension methods that simplify working with a dictionary that has a collection-values item-type. + + + + + Extension methods for + + + + + Returns an instance of that represents this collection and can be enumerated even while the collection changes; + the enumerator will adapt to the changes (see ). + + + + + Returns an instance of that represents this collection and can be enumerated even while the collection changes; + the enumerator will adapt to the changes (see ). The enumerable will yield + instances of type , which hold both the index and the value of the current item. If this collection changes + while enumerating, will reflect those changes. + + + + + Represents a default implementation of that is automatically used by + unless a custom is specified. The executes queries by parsing them into + an instance of type , which is then passed to an implementation of to obtain the + result set. + + + + + Provides a default implementation of that executes queries (subclasses of ) by + first parsing them into a and then passing that to a given implementation of . + Usually, should be used unless must be manually implemented. + + + + + Initializes a new instance of using a custom . Use this + constructor to customize how queries are parsed. + + The used to parse queries. Specify an instance of + for default behavior. + The used to execute queries against a specific query backend. + + + + Constructs an object that can evaluate the query represented by a specified expression tree. This + method delegates to . + + An expression tree that represents a LINQ query. + + An that can evaluate the query represented by the specified expression tree. + + + + + Constructs an object that can evaluate the query represented by a specified expression tree. This method is + called by the standard query operators defined by the class. + + An expression tree that represents a LINQ query. + + An that can evaluate the query represented by the specified expression tree. + + + + + Executes the query defined by the specified expression by parsing it with a + and then running it through the . + This method is invoked through the interface methods, for example by + and + , and it's also used by + when the is enumerated. + + + Override this method to replace the query execution mechanism by a custom implementation. + + + + + Executes the query defined by the specified expression by parsing it with a + and then running it through the . + The result is cast to . + + The type of the query result. + The query expression to be executed. + The result of the query cast to . + + This method is called by the standard query operators that return a single value, such as + or + . + In addition, it is called by to execute queries that return sequences. + + + + + Executes the query defined by the specified expression by parsing it with a + and then running it through the . + + The query expression to be executed. + The result of the query. + + This method is similar to the method, but without the cast to a defined return type. + + + + + The method generates a . + + The query as expression chain. + a + + + + Gets the used by this to parse LINQ queries. + + The query parser. + + + + Gets or sets the implementation of used to execute queries created via . + + The executor used to execute queries. + + + + Initializes a new instance of using a custom . + + + A type implementing . This type is used to construct the chain of query operators. Must be a generic type + definition. + + The used to parse queries. Specify an instance of + for default behavior. See also . + The used to execute queries against a specific query backend. + + + + Creates a new (of type with as its generic argument) that + represents the query defined by and is able to enumerate its results. + + The type of the data items returned by the query. + An expression representing the query for which a should be created. + An that represents the query defined by . + + + + Gets the type of queryable created by this provider. This is the generic type definition of an implementation of + (usually a subclass of ) with exactly one type argument. + + + + + Constitutes the bridge between re-linq and a concrete query provider implementation. Concrete providers implement this interface + and calls the respective method of the interface implementation when a query is to be executed. + + + + + Executes the given as a scalar query, i.e. as a query returning a scalar value of type . + The query ends with a scalar result operator, for example a or a . + + The type of the scalar value returned by the query. + The representing the query to be executed. Analyze this via an + . + A scalar value of type that represents the query's result. + + The difference between and is in the kind of object that is returned. + is used when a query that would otherwise return a collection result set should pick a single value from the + set, for example the first, last, minimum, maximum, or only value in the set. is used when a value is + calculated or aggregated from all the values in the collection result set. This applies to, for example, item counts, average calculations, + checks for the existence of a specific item, and so on. + + + + + Executes the given as a single object query, i.e. as a query returning a single object of type + . + The query ends with a single result operator, for example a or a . + + The type of the single value returned by the query. + The representing the query to be executed. Analyze this via an + . + If , the executor must return a default value when its result set is empty; + if , it should throw an when its result set is empty. + A single value of type that represents the query's result. + + The difference between and is in the kind of object that is returned. + is used when a query that would otherwise return a collection result set should pick a single value from the + set, for example the first, last, minimum, maximum, or only value in the set. is used when a value is + calculated or aggregated from all the values in the collection result set. This applies to, for example, item counts, average calculations, + checks for the existence of a specific item, and so on. + + + + + Executes the given as a collection query, i.e. as a query returning objects of type . + The query does not end with a scalar result operator, but it can end with a single result operator, for example + or . In such a case, the returned enumerable must yield exactly + one object (or none if the last result operator allows empty result sets). + + The type of the items returned by the query. + The representing the query to be executed. Analyze this via an + . + A scalar value of type that represents the query's result. + + + + Defines an interface for visiting the clauses of a . + + + + When implement this interface, implement , then call Accept on every clause that should + be visited. Child clauses, joins, orderings, and result operators are not visited automatically; they always need to be explicitly visited + via , , , + , and so on. + + + provides a robust default implementation of this interface that can be used as a base for other visitors. + + + + + + Represents a being bound to an associated instance. This binding's + method returns only for the same the expression is bound to. + + + + + + Represents a being bound to an associated instance. This is used by the + to represent assignments in constructor calls such as new AnonymousType (a = 5), + where a is the member of AnonymousType and 5 is the associated expression. + The method can be used to check whether the member bound to an expression matches a given + (considering read access). See the subclasses for details. + + + + + Represents a being bound to an associated instance. + + This binding's + method returns for the same the expression is bound to or for a + whose getter method is the the expression is bound to. + + + + + Represents a being bound to an associated instance. + + This binding's + method returns for the same the expression is bound to + or for its getter method's . + + + + + Replaces nodes according to a given mapping specification. Expressions are also replaced within subqueries; the + is changed by the replacement operations, it is not copied. The replacement node is not recursively searched for + occurrences of nodes to be replaced. + + + + + Takes an expression tree and first analyzes it for evaluatable subtrees (using ), i.e. + subtrees that can be pre-evaluated before actually generating the query. Examples for evaluatable subtrees are operations on constant + values (constant folding), access to closure variables (variables used by the LINQ query that are defined in an outer scope), or method + calls on known objects or their members. In a second step, it replaces all of the evaluatable subtrees (top-down and non-recursive) by + their evaluated counterparts. + + + This visitor visits each tree node at most twice: once via the for analysis and once + again to replace nodes if possible (unless the parent node has already been replaced). + + + + + Takes an expression tree and finds and evaluates all its evaluatable subtrees. + + + + + Evaluates an evaluatable subtree, i.e. an independent expression tree that is compilable and executable + without any data being passed in. The result of the evaluation is returned as a ; if the subtree + is already a , no evaluation is performed. + + The subtree to be evaluated. + A holding the result of the evaluation. + + + + Replaces all nodes that equal a given with a replacement node. Expressions are also replaced within subqueries; the + is changed by the replacement operations, it is not copied. The replacement node is not recursively searched for + occurrences of the to be replaced. + + + + + Preprocesses an expression tree for parsing. The preprocessing involves detection of sub-queries and VB-specific expressions. + + + + + Transforms a given . If the can handle the , + it should return a new, transformed instance. Otherwise, it should return the input + instance. + + The expression to be transformed. + The result of the transformation, or if no transformation was applied. + + + + Manages registration and lookup of objects, and converts them to + weakly typed instances. Use this class together with + in order to apply the registered transformers to an tree. + + + + + defines an API for classes returning instances for specific + objects. Usually, the will be used when an implementation of this + interface is needed. + + + + + Gets the transformers for the given . + + The to be transformed. + + A sequence containing objects that should be applied to the . Must not + be . + + + + + Creates an with the default transformations provided by this library already registered. + New transformers can be registered by calling . + + A default . + + Currently, the default registry contains: + + + + + + + + + + + + + + Registers the specified for the transformer's + . If + returns , the is registered as a generic transformer which will be applied to all + nodes. + + The type of expressions handled by the . This should be a type implemented by all + expressions identified by . For generic transformers, + must be . + The transformer to register. + + + The order in which transformers are registered is the same order on which they will later be applied by + . When more than one transformer is registered for a certain , + each of them will get a chance to transform a given , until the first one returns a new . + At that point, the transformation will start again with the new (and, if the expression's type has changed, potentially + different transformers). + + + When generic transformers are registered, they act as if they had been registered for all values (including + custom ones). They will be applied in the order registered, but only after all respective specific transformers have run (without modifying + the expression, which would restart the transformation process with the new expression as explained above). + + + When an is registered for an incompatible , this is not detected until + the transformer is actually applied to an of that . + + + + + + is implemented by classes that transform instances. The + manages registration of instances, and the + applies the transformations. + + The type of expressions handled by this implementation. + + + is a convenience interface that provides strong typing, whereas + only operates on instances. + + + can be used together with the class by using the + class as the transformation provider. converts + strongly typed instances to weakly typed delegate instances. + + + + + + Transforms a given . If the implementation can handle the , + it should return a new, transformed instance. Otherwise, it should return the input + instance. + + The expression to be transformed. + The result of the transformation, or if no transformation was applied. + + + + Gets the expression types supported by this . + + The supported expression types. Return to support all expression types. (This is only sensible when + is .) + + + + + Dynamically discovers attributes implementing the interface on methods and get accessors + invoked by or instances and applies the respective + . + + + + + Defines an interface for attributes providing an for a given . + + + + detects attributes implementing this interface while expressions are parsed + and uses the returned by to modify the expressions. + + + Only one attribute instance implementing must be applied to a single method or property + get accessor. + + + + + + Detects nodes for and adds metadata to those nodes. + This allows LINQ providers to match member access and constructor arguments more easily. + + + + + Provides a base class for transformers detecting nodes for tuple types and adding metadata + to those nodes. This allows LINQ providers to match member access and constructor arguments more easily. + + + + + Detects expressions invoking a and replaces them with the body of that + (with the parameter references replaced with the invocation arguments). + Providers use this transformation to be able to handle queries with instances. + + + When the is applied to a delegate instance (rather than a + ), the ignores it. + + + + + Detects nodes for and adds metadata to those nodes. + This allows LINQ providers to match member access and constructor arguments more easily. + + + + + Chooses a given for a specific method (or property get accessor). + + + The must have a default constructor. To choose a transformer that does not have a default constructor, + create your own custom attribute class implementing + . + + + + + Replaces calls to and with casts and null checks. This allows LINQ providers + to treat nullables like reference types. + + + + + Detects nodes for the .NET tuple types and adds metadata to those nodes. + This allows LINQ providers to match member access and constructor arguments more easily. + + + + + Detects expressions calling the CompareString method used by Visual Basic .NET, and replaces them with + instances. Providers use this transformation to be able to handle VB string comparisons + more easily. See for details. + + + + + Detects expressions calling the Information.IsNothing (...) method used by Visual Basic .NET, and replaces them with + instances comparing with . Providers use this transformation to be able to + handle queries using IsNothing (...) more easily. + + + + + Applies delegates obtained from an to an expression tree. + The transformations occur in post-order (transforming child nodes before parent nodes). When a transformation changes + the current , its child nodes and itself will be revisited (and may be transformed again). + + + + + Replaces expression patterns of the form new T { x = 1, y = 2 }.x () or + new T ( x = 1, y = 2 ).x () to 1 (or 2 if y is accessed instead of x). + Expressions are also replaced within subqueries; the is changed by the replacement operations, it is not copied. + + + + + Base class for typical implementations of the . + + + + + + + The interface defines an extension point for disabling partial evaluation on specific nodes. + + + + Implement the individual evaluation methods and return to mark a specfic node as not partially + evaluatable. Note that the partial evaluation infrastructure will take care of visiting an node's children, + so the determination can usually be constrained to the attributes of the node itself. + + Use the type as a base class for filter implementations that only require testing a few + node types, e.g. to disable partial evaluation for individual method calls. + + + + + + + + Analyzes an expression tree by visiting each of its nodes, finding those subtrees that can be evaluated without modifying the meaning of + the tree. + + + An expression node/subtree is evaluatable if: + + it is not a or any non-standard expression, + it is not a that involves an , and + it does not have any of those non-evaluatable expressions as its children. + + + nodes are not evaluatable because they usually identify the flow of + some information from one query node to the next. + + nodes that involve parameters or object instances are not evaluatable because they + should usually be translated into the target query syntax. + + In .NET 3.5, non-standard expressions are not evaluatable because they cannot be compiled and evaluated by LINQ. + In .NET 4.0, non-standard expressions can be evaluated if they can be reduced to an evaluatable expression. + + + + + + Determines whether the given is one of the expressions defined by for which + has a dedicated Visit method. handles those by calling the respective Visit method. + + The expression to check. Must not be . + + if is one of the expressions defined by and + has a dedicated Visit method for it; otherwise, . + Note that -type expressions are considered 'not supported' and will also return . + + + + + Implementation of the null-object pattern for . + + + + + + Parses an expression tree into a chain of objects after executing a sequence of + objects. + + + + + Creates a default that already has all expression node parser defined by the re-linq assembly + registered. Users can add inner providers to register their own expression node parsers. + + A default that already has all expression node parser defined by the re-linq assembly + registered. + + + + Creates a default that already has the expression tree processing steps defined by the re-linq assembly + registered. Users can insert additional processing steps. + + + The tranformation provider to be used by the included + in the result set. Use to create a default provider. + + + The expression filter used by the included in the result set. + Use to indicate that no custom filtering should be applied. + + + A default that already has all expression tree processing steps defined by the re-linq assembly + registered. + + + The following steps are included: + + + (parameterized with ) + + + + + + Initializes a new instance of the class with a custom and + implementation. + + The to use when parsing trees. Use + to create an instance of that already includes all + default node types. (The can be customized as needed by adding or removing + ). + The to apply to trees before parsing their nodes. Use + to create an instance of that already includes + the default steps. (The can be customized as needed by adding or removing + ). + + + + Parses the given into a chain of instances, using + to convert expressions to nodes. + + The expression tree to parse. + A chain of instances representing the . + + + + Gets the query operator represented by . If + is already a , that is the assumed query operator. If is a + and the member's getter is registered with , a corresponding + is constructed and returned. Otherwise, is returned. + + The expression to get a query operator expression for. + A to be parsed as a query operator, or if the expression does not represent + a query operator. + + + + Infers the associated identifier for the source expression node contained in methodCallExpression.Arguments[0]. For example, for the + call chain "source.Where (i => i > 5)" (which actually reads "Where (source, i => i > 5"), the identifier "i" is associated + with the node generated for "source". If no identifier can be inferred, is returned. + + + + + Gets the node type provider used to parse instances in . + + The node type provider. + + + + Gets the processing steps used by to process the tree before analyzing its structure. + + The processing steps. + + + + Implements by storing a list of inner instances. + The method calls each inner instance in the order defined by the property. This is an + implementation of the Composite Pattern. + + + + + is implemented by classes that represent steps in the process of parsing the structure + of an tree. applies a series of these steps to the + tree before analyzing the query operators and creating a . + + + + There are predefined implementations of that should only be left out when parsing an + tree when there are very good reasons to do so. + + + can be implemented to provide custom, complex transformations on an + tree. For performance reasons, avoid adding too many steps each of which visits the whole tree. For + simple transformations, consider using and - which can + batch several transformations into a single expression tree visiting run - rather than implementing a dedicated + . + + + + + + Implements the interface by doing nothing in the method. This is an + implementation of the Null Object Pattern. + + + + + Analyzes an tree for sub-trees that are evaluatable in-memory, and evaluates those sub-trees. + + + The uses the for partial evaluation. + It performs two visiting runs over the tree. + + + + + Applies a given set of transformations to an tree. The transformations are provided by an instance of + (eg., ). + + + The uses the to apply the transformations. + It performs a single visiting run over the tree. + + + + + Initializes a new instance of the class. + + A class providing the transformations to apply to the tree, eg., an instance of + . + + + + Provides a common interface for classes mapping a to the respective + type. Implementations are used by when a is encountered to + instantiate the right for the given method. + + + + + Determines whether a node type for the given can be returned by this + . + + + + + Gets the type of that matches the given , returning + if none can be found. + + + + + Represents a for the + and methods. + It is generated by when an tree is parsed. + When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query. + + + + + Acts as a base class for s standing for s that operate on the result of the query + rather than representing actual clauses, such as or . + + + + + Base class for implementations that represent instantiations of . + + + + + Interface for classes representing structural parts of an tree. + + + + + Resolves the specified by replacing any occurrence of + by the result of the projection of this . The result is an that goes all the + way to an . + + The parameter representing the input data streaming into an . This is replaced + by the projection data coming out of this . + The expression to be resolved. Any occurrence of in this expression + is replaced. + Context information used during the current parsing process. This structure maps + s to the clauses created from them. Implementers that also implement + (such as or ) must add + their clauses to the mapping in if they want to be able to implement correctly. + An equivalent of with each occurrence of replaced by + the projection data streaming out of this . + + This node does not support this operation because it does not stream any data to subsequent nodes. + + + + + Applies this to the specified query model. Nodes can add or replace clauses, add or replace expressions, + add or replace objects, or even create a completely new , depending on their semantics. + + The query model this node should be applied to. + Context information used during the current parsing process. This structure maps + s to the clauses created from them. Implementers that + also implement (such as + or ) must add their clauses to the mapping in + in order to be able to implement correctly. + The modified or a new that reflects the changes made by this node. + + For objects, which mark the end of an chain, this method must not be called. + Instead, use to generate a and instantiate a new + with that clause. + + + + + Gets the source that streams data into this node. + + The source , or if this node is the end of the chain. + + + + Gets the identifier associated with this . tries to find the identifier + that was originally associated with this node in the query written by the user by analyzing the parameter names of the next expression in the + method call chain. + + The associated identifier. + + + + Wraps the into a subquery after a node that indicates the end of the query ( + or ). Override this method + when implementing a that does not need a subquery to be created if it occurs after the query end. + + + + When an ordinary node follows a result operator or group node, it cannot simply append its clauses to the + because semantically, the result operator (or grouping) must be executed _before_ the clause. Therefore, in such scenarios, we wrap + the current query model into a that we put into the of a new + . + + + This method also changes the of this node because logically, all operations must be handled + by the new holding the . For example, consider the following call chain: + + MainSource (...) + .Select (x => x) + .Distinct () + .Select (x => x) + + + Naively, the last Select node would resolve (via Distinct and Select) to the created by the initial MainSource. + After this method is executed, however, that is part of the sub query, and a new + has been created to hold it. Therefore, we replace the chain as follows: + + MainSource (MainSource (...).Select (x => x).Distinct ()) + .Select (x => x) + + + Now, the last Select node resolves to the new . + + + + + + Sets the result type override of the given . + + The query model to set the of. + + By default, the result type override is set to in the method. This ensures that the query + model represents the type of the query correctly. Specific node parsers can override this method to set the + to another value, or to clear it (set it to ). Do not leave the + unchanged when overriding this method, as a source node might have set it to a value that doesn't + fit this node. + + + + + Represents a for the + , , + , and + methods. + It is generated by when an tree is parsed. + When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query. + + + + + Represents a for the + and + methods. + It is generated by when an tree is parsed. + When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query. + + + + + Represents a for the , + , + , and + methods. + It is generated by when an tree is parsed. + When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query. + + + + + Represents a for or . + It is generated by when an tree is parsed. + When this node is used, it will not modify the , i.e. the call to + will be removed given how it is transparent to the process of executing the query. + + + + + Represents a for the different overloads of . + It is generated by when an tree is parsed. + When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query. + + + + + Represents a for + . + It is generated by when an tree is parsed. + + + + + Encapsulates contextual information used while generating clauses from instances. + + + + + Represents a for + . + It is generated by when an tree is parsed. + When this node is used, it usually follows (or replaces) a of an chain that + represents a query. + + + + + Acts as a base class for and , i.e., for node parsers for set operations + acting as an . + + + + + Interface for classes representing query source parts of an tree. + + + + + Represents a for and + . + It is generated by when an tree is parsed. + When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query. + + + + + Represents a for , + , + for the Count properties of , , , + and , and for the property of arrays. + It is generated by when an tree is parsed. + When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query. + + + + + Represents a for and + and + and + + It is generated by when an tree is parsed. + When this node is used, it usually follows (or replaces) a of an chain that + represents a query. + + + + + Represents a for . + It is generated by when an tree is parsed. + When this node is used, it usually follows (or replaces) a of an chain that + represents a query. + + + + + Represents a for + . + It is generated by when an tree is parsed. + When this node is used, it usually follows (or replaces) a of an chain that + represents a query. + + + + + Thrown whan an parser cannot be instantiated for a query. Note that this is not serializable + and intended to be caught in the call-site where it will then replaced by a different (serializable) exception. + + + + + Resolves an expression using , removing transparent identifiers and detecting subqueries + in the process. This is used by methods such as , which are + used when a clause is created from an . + + + + + Represents a for , + , + or + . + It is generated by when an tree is parsed. + When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query. + + + + + Represents a for the different + overloads that do not take a result selector. The overloads with a result selector are represented by + . + It is generated by when an tree is parsed. + + + + + Represents a for the different + overloads that do take a result selector. The overloads without a result selector are represented by + . + It is generated by when an tree is parsed. + + + The GroupBy overloads with result selector are parsed as if they were a following a + : + + x.GroupBy (k => key, e => element, (k, g) => result) + + is therefore equivalent to: + + c.GroupBy (k => key, e => element).Select (grouping => resultSub) + + where resultSub is the same as result with k and g substituted with grouping.Key and grouping, respectively. + + + + + Represents a for + + or + It is generated by when an tree is parsed. + + + + + Represents a for + . + It is generated by when an tree is parsed. + When this node is used, it usually follows (or replaces) a of an chain that + represents a query. + + + + + Represents a for + + or . + It is generated by when an tree is parsed. + + + + + Represents a for , + , + or + . + It is generated by when an tree is parsed. + When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query. + + + + + Represents a for , + , + and for the property of arrays. + It is generated by when an tree is parsed. + When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query. + + + + + Represents the first expression in a LINQ query, which acts as the main query source. + It is generated by when an tree is parsed. + This node usually marks the end (i.e. the first node) of an chain that represents a query. + + + + + Represents a for or . + It is generated by when an tree is parsed. + When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query. + + + + + Creates instances of classes implementing the interface via Reflection. + + + The classes implementing instantiated by this factory must implement a single constructor. The source and + constructor parameters handed to the method are passed on to the constructor; for each argument where no + parameter is passed, is passed to the constructor. + + + + + Creates an instace of type . + + + Thrown if the or the + do not match expected constructor parameters of the . + + + + + Contains metadata about a that is parsed into a . + + + + + Gets the associated identifier, i.e. the name the user gave the data streaming out of this expression. For example, the + corresponding to a from c in C clause should get the identifier "c". + If there is no user-defined identifier (or the identifier is impossible to infer from the expression tree), a generated identifier + is given instead. + + + + + Gets the source expression node, i.e. the node streaming data into the parsed node. + + The source. + + + + Gets the being parsed. + + + + + Represents a for or . + It is generated by when an tree is parsed. + When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query. + + + + + Represents a for + and . + It is generated by when an tree is parsed. + + + + + Represents a for + . + It is generated by when an tree is parsed. + + + + + Represents a for + . + It is generated by when an tree is parsed. + + + + + Provides common functionality used by implementors of . + + + + + Replaces the given parameter with a back-reference to the corresponding to . + + The referenced node. + The parameter to replace with a . + The expression in which to replace the parameter. + The clause generation context. + , with replaced with a + pointing to the clause corresponding to . + + + + Gets the corresponding to the given , throwing an + if no such clause has been registered in the given . + + The node for which the should be returned. + The clause generation context. + The corresponding to . + + + + Caches a resolved expression in the classes. + + + + + Represents a for . + It is generated by when an tree is parsed. + When this node is used, it usually follows (or replaces) a of an chain that + represents a query. + + + + + Represents a for + . + It is generated by when an tree is parsed. + + + + + Represents a for + . + It is generated by when an tree is parsed. + This node represents an additional query source introduced to the query. + + + + + Represents a for , + , + or + . + It is generated by when an tree is parsed. + When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query. + + + + + Represents a for + It is generated by when an tree is parsed. + When this node is used, it usually follows (or replaces) a of an chain that + represents a query. + + + + + Represents a for the different overloads of . + It is generated by when an tree is parsed. + When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query. + + + + + Represents a for . + It is generated by when an tree is parsed. + When this node is used, it usually follows (or replaces) a of an chain that + represents a query. + + + + + Represents a for + . + It is generated by when an tree is parsed. + When this node is used, it follows an , an , + a , or a . + + + + + Represents a for + . + It is generated by when an tree is parsed. + When this node is used, it follows an , an , + a , or a . + + + + + Represents a for + . + It is generated by when an tree is parsed. + When this node is used, it usually follows (or replaces) a of an chain that + represents a query. + + + + + Represents a for + . + It is generated by when an tree is parsed. + + + + + is implemented by classes taking an tree and parsing it into a . + + + The default implementation of this interface is . LINQ providers can, however, implement + themselves, eg. in order to decorate or replace the functionality of . + + + + + Gets the of the given . + + The expression tree to parse. + A that represents the query defined in . + + + + Parses a and creates an from it. This is used by + for parsing whole expression trees. + + + + + Implements by storing a list of inner instances. + The and methods delegate to these inner instances. This is an + implementation of the Composite Pattern. + + + + + Maps the objects used in objects to the respective + types. This is used by when a is encountered to instantiate the + right for the given method. + + + + + Creates a and registers all relevant implementations in the Remotion.Linq assembly. + + + A with all types in the Remotion.Linq assembly registered. + + + + + Gets the registerable method definition from a given . A registerable method is a object + that can be registered via a call to . When the given is passed to + and its corresponding registerable method was registered, the correct node type is returned. + + The method for which the registerable method should be retrieved. Must not be . + + to throw a if the method cannot be matched to a distinct generic method definition, + to return if an unambiguous match is not possible. + + + + itself, unless it is a closed generic method or declared in a closed generic type. In the latter cases, + the corresponding generic method definition respectively the method declared in a generic type definition is returned. + + If no generic method definition could be matched and was set to , + is returned. + + + + Thrown if is set to and no distinct generic method definition could be resolved. + + + + + Registers the specific with the given . The given methods must either be non-generic + or open generic method definitions. If a method has already been registered before, the later registration overwrites the earlier one. + + + + + Determines whether the specified method was registered with this . + + + + + Gets the type of registered with this instance that + matches the given , returning if none can be found. + + + + + Returns the count of the registered s. + + + + + Maps the objects used in objects to the respective + types based on the method names and a filter (as defined by ). + This is used by when a is encountered to instantiate the right + for the given method. + + + + + Creates a and registers all relevant implementations in the Remotion.Linq assembly. + + + A with all types in the Remotion.Linq assembly registered. + + + + + Registers the given for the query operator methods defined by the given + objects. + + A sequence of objects defining the methods to register the node type for. + The type of the to register. + + + + Determines whether the specified method was registered with this . + + + + + Gets the type of registered with this instance that + matches the given , returning if none can be found. + + + + + Returns the count of the registered method names. + + + + + Defines a name and a filter predicate used when determining the matching expression node type by . + + + + + Takes an tree and parses it into a by use of an . + It first transforms the tree into a chain of instances, and then calls + and in order to instantiate all the + s. With those, a is created and returned. + + + + + Initializes a new instance of the class, using default parameters for parsing. + The used has all relevant methods of the class + automatically registered, and the comprises partial evaluation, and default + expression transformations. See , + , and + for details. + + + + + Initializes a new instance of the class, using the given to + convert instances into s. Use this constructor if you wish to customize the + parser. To use a default parser (with the possibility to register custom node types), use the method. + + The expression tree parser. + + + + Gets the of the given . + + The expression tree to parse. + A that represents the query defined in . + + + + Applies all nodes to a , which is created by the trailing in the + chain. + + The entry point to the chain. + The clause generation context collecting context information during the parsing process. + A created by the training and transformed by each node in the + chain. + + + + Gets the used by to parse instances. + + The node type registry. + + + + Gets the used by to process the tree + before analyzing its structure. + + The processor. + + + + Implements an that throws an exception for every expression type that is not explicitly supported. + Inherit from this class to ensure that an exception is thrown when an expression is passed + + + + + Called when an unhandled item is visited. This method provides the item the visitor cannot handle (), + the that is not implemented in the visitor, and a delegate that can be used to invoke the + of the class. The default behavior of this method is to call the + method, but it can be overridden to do something else. + + The type of the item that could not be handled. Either an type, a + type, or . + The result type expected for the visited . + The unhandled item. + The visit method that is not implemented. + The behavior exposed by for this item type. + An object to replace in the expression tree. Alternatively, the method can throw any exception. + + + + can be used to build tuples incorporating a sequence of s. + For example, given three expressions, exp1, exp2, and exp3, it will build nested s that are equivalent to the + following: new KeyValuePair(exp1, new KeyValuePair(exp2, exp3)). + Given an whose type matches that of a tuple built by , the builder can also return + an enumeration of accessor expressions that can be used to access the tuple elements in the same order as they were put into the nested tuple + expression. In above example, this would yield tupleExpression.Key, tupleExpression.Value.Key, and tupleExpression.Value.Value. + This class can be handy whenever a set of needs to be put into a single + (eg., a select projection), especially if each sub-expression needs to be explicitly accessed at a later point of time (eg., to retrieve the + items from a statement surrounding a sub-statement yielding the tuple in its select projection). + + + + + Acts as a common base class for implementations based on re-linq. In a specific LINQ provider, a custom queryable + class should be derived from which supplies an implementation of that is used to + execute the query. This is then used as an entry point (the main data source) of a LINQ query. + + The type of the result items yielded by this query. + + + + Initializes a new instance of the class with a and the given + . This constructor should be used by subclasses to begin a new query. The generated by + this constructor is a pointing back to this . + + The used to parse queries. Specify an instance of + for default behavior. See also . + The used to execute the query represented by this . + + + + Initializes a new instance of the class with a specific . This constructor + should only be used to begin a query when does not fit the requirements. + + The provider used to execute the query represented by this and to construct + queries around this . + + + + Initializes a new instance of the class with a given and + . This is an infrastructure constructor that must be exposed on subclasses because it is used by + to construct queries around this when a query method (e.g. of the + class) is called. + + The provider used to execute the query represented by this and to construct + queries around this . + The expression representing the query. + + + + Executes the query via the and returns an enumerator that iterates through the items returned by the query. + + + A that can be used to iterate through the query result. + + + + + Gets the expression tree that is associated with the instance of . This expression describes the + query represented by this . + + + + The that is associated with this instance of . + + + + + Gets the query provider that is associated with this data source. The provider is used to execute the query. By default, a + is used that parses the query and passes it on to an implementation of . + + + + The that is associated with this data source. + + + + + Gets the type of the element(s) that are returned when the expression tree associated with this instance of is executed. + + + + A that represents the type of the element(s) that are returned when the expression tree associated with this object is executed. + + + + + Provides an abstraction of an expression tree created for a LINQ query. instances are passed to LINQ providers based + on re-linq via , but you can also use to parse an expression tree by hand or construct + a manually via its constructor. + + + The different parts of the query are mapped to clauses, see , , and + . The simplest way to process all the clauses belonging to a is by implementing + (or deriving from ) and calling . + + + + + Initializes a new instance of + + The of the query. This is the starting point of the query, generating items + that are filtered and projected by the query. + The of the query. This is the end point of + the query, it defines what is actually returned for each of the items coming from the and passing the + . After it, only the modify the result of the query. + + + + Gets an object describing the data streaming out of this . If a query ends with + the , this corresponds to . If a query has + , the data is further modified by those operators. + + Gets a object describing the data streaming out of this . + + The data streamed from a is often of type instantiated + with a specific item type, unless the + query ends with a . For example, if the query ends with a , the + result type will be . + + + The is not compatible with the calculated calculated from the . + + + + + Gets the which is used by the . + + + + + + Accepts an implementation of or , as defined by the Visitor pattern. + + + + + Returns a representation of this . + + + + + Clones this , returning a new equivalent to this instance, but with its clauses being + clones of this instance's clauses. Any in the cloned clauses that points back to another clause + in this (including its subqueries) is adjusted to point to the respective clones in the cloned + . Any subquery nested in the is also cloned. + + + + + Clones this , returning a new equivalent to this instance, but with its clauses being + clones of this instance's clauses. Any in the cloned clauses that points back to another clause + in this (including its subqueries) is adjusted to point to the respective clones in the cloned + . Any subquery nested in the is also cloned. + + The defining how to adjust instances of + in the cloned . If there is a + that points out of the being cloned, specify its replacement via this parameter. At the end of the cloning process, + this object maps all the clauses in this original to the clones created in the process. + + + + + Transforms all the expressions in this 's clauses via the given delegate. + + The transformation object. This delegate is called for each within this + , and those expressions will be replaced with what the delegate returns. + + + + Returns a new name with the given prefix. The name is different from that of any added + in the . Note that clause names that are changed after the clause is added as well as names of other clauses + than from clauses are not considered when determining "unique" names. Use names only for readability and debugging, not + for uniquely identifying clauses. + + + + + Executes this via the given . By default, this indirectly calls + , but this can be modified by the . + + The to use for executing this query. + + + + Determines whether this represents an identity query. An identity query is a query without any body clauses + whose selects exactly the items produced by its . An identity query can have + . + + + if this represents an identity query; otherwise, . + + + An example for an identity query is the subquery in that is produced for the in the following + query: + + from order in ... + select order.OrderItems.Count() + + In this query, the will become a because + is treated as a query operator. The + in that has no and a trivial , + so its method returns . The outer , on the other hand, does not + have a trivial , so its method returns . + + + + + Creates a new that has this as a sub-query in its . + + The name of the new 's . + A new whose 's is a + that holds this instance. + + + + Gets or sets the query's . This is the starting point of the query, generating items that are processed by + the and projected or grouped by the . + + + + + Gets or sets the query's select clause. This is the end point of the query, it defines what is actually returned for each of the + items coming from the and passing the . After it, only the + modify the result of the query. + + + + + Gets a collection representing the query's body clauses. Body clauses take the items generated by the , + filtering (), ordering (), augmenting (), or otherwise + processing them before they are passed to the . + + + + + Gets the result operators attached to this . Result operators modify the query's result set, aggregating, + filtering, or otherwise processing the result before it is returned. + + + + + Collects clauses and creates a from them. This provides a simple way to first add all the clauses and then + create the rather than the two-step approach (first and , + then the s) required by 's constructor. + + + + + Provides a default implementation of which automatically visits child items. That is, the default + implementation of automatically calls Accept on all clauses in the + and the default implementation of automatically calls on the + instances in its collection, and so on. + + + This visitor is hardened against modifications performed on the visited while the model is currently being visited. + That is, if a the collection changes while a body clause (or a child item of a body clause) is currently + being processed, the visitor will handle that gracefully. The same applies to and + . + + + + + Takes a and transforms it by replacing its instances ( and + ) that contain subqueries with equivalent flattened clauses. Subqueries that contain a + (such as or ) cannot be + flattened. + + + As an example, take the following query: + + from c in Customers + from o in (from oi in OrderInfos where oi.Customer == c orderby oi.OrderDate select oi.Order) + orderby o.Product.Name + select new { c, o } + + This will be transformed into: + + from c in Customers + from oi in OrderInfos + where oi.Customer == c + orderby oi.OrderDate + orderby oi.Order.Product.Name + select new { c, oi.Order } + + As another example, take the following query: + + from c in (from o in Orders select o.Customer) + where c.Name.StartsWith ("Miller") + select c + + (This query is never produced by the , the only way to construct it is via manually building a + .) + This will be transforemd into: + + from o in Orders + where o.Customer.Name.StartsWith ("Miller") + select o + + + + + + Generates unique identifiers based on a set of known identifiers. + An identifier is generated by appending a number to a given prefix. The identifier is considered unique when no known identifier + exists which equals the prefix/number combination. + + + + + Adds the given to the set of known identifiers. + + The identifier to add. + + + + Gets a unique identifier starting with the given . The identifier is generating by appending a number to the + prefix so that the resulting string does not match a known identifier. + + The prefix to use for the identifier. + A unique identifier starting with . + + + + Provides extensions for working with trees. + + + + + Builds a string from the tree, including .NET 3.5. + + + + + Provider a utility API for dealing with the item type of generic collections. + + + + + Tries to extract the item type from the input . + + + The that might be an implementation of the interface. Must not be . + + An output parameter containing the extracted item or . + if an could be extracted, otherwise . + +
+
diff --git a/nhibernateg7/nhibernateg7/bin/Debug/nhibernateg7.exe b/nhibernateg7/nhibernateg7/bin/Debug/nhibernateg7.exe new file mode 100644 index 0000000..60566a2 Binary files /dev/null and b/nhibernateg7/nhibernateg7/bin/Debug/nhibernateg7.exe differ diff --git a/nhibernateg7/nhibernateg7/bin/Debug/nhibernateg7.exe.config b/nhibernateg7/nhibernateg7/bin/Debug/nhibernateg7.exe.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/nhibernateg7/nhibernateg7/bin/Debug/nhibernateg7.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/nhibernateg7/nhibernateg7/bin/Debug/nhibernateg7.pdb b/nhibernateg7/nhibernateg7/bin/Debug/nhibernateg7.pdb new file mode 100644 index 0000000..33352a2 Binary files /dev/null and b/nhibernateg7/nhibernateg7/bin/Debug/nhibernateg7.pdb differ diff --git a/nhibernateg7/nhibernateg7/nhibernateg7.csproj b/nhibernateg7/nhibernateg7/nhibernateg7.csproj new file mode 100644 index 0000000..168d06a --- /dev/null +++ b/nhibernateg7/nhibernateg7/nhibernateg7.csproj @@ -0,0 +1,107 @@ + + + + + Debug + AnyCPU + {0E2C1D56-8D94-4424-BC66-3305C1258B38} + Exe + nhibernateg7 + nhibernateg7 + v4.7.2 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + ..\packages\Antlr3.Runtime.3.5.1\lib\net40-client\Antlr3.Runtime.dll + + + ..\packages\Iesi.Collections.4.0.4\lib\net461\Iesi.Collections.dll + + + ..\packages\NHibernate.5.2.5\lib\net461\NHibernate.dll + + + ..\packages\Remotion.Linq.2.2.0\lib\net45\Remotion.Linq.dll + + + ..\packages\Remotion.Linq.EagerFetching.2.2.0\lib\net45\Remotion.Linq.EagerFetching.dll + + + + + + + + + + + + + + 4.0 + + + + + + + + + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + \ No newline at end of file diff --git a/nhibernateg7/nhibernateg7/obj/Debug/App.g.i.cs b/nhibernateg7/nhibernateg7/obj/Debug/App.g.i.cs new file mode 100644 index 0000000..3edcdf7 --- /dev/null +++ b/nhibernateg7/nhibernateg7/obj/Debug/App.g.i.cs @@ -0,0 +1,70 @@ +#pragma checksum "..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "FA17886E020D1615FCFBCF56030C4EF56B3F279B3168A2F9AAB045DDAD2979EF" +//------------------------------------------------------------------------------ +// +// Este código fue generado por una herramienta. +// Versión de runtime:4.0.30319.42000 +// +// Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si +// se vuelve a generar el código. +// +//------------------------------------------------------------------------------ + +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; +using nhibernateg7; + + +namespace nhibernateg7 { + + + /// + /// App + /// + public partial class App : System.Windows.Application { + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + + #line 5 "..\..\App.xaml" + this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative); + + #line default + #line hidden + } + + /// + /// Application Entry Point. + /// + [System.STAThreadAttribute()] + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public static void Main() { + nhibernateg7.App app = new nhibernateg7.App(); + app.InitializeComponent(); + app.Run(); + } + } +} + diff --git a/nhibernateg7/nhibernateg7/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/nhibernateg7/nhibernateg7/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..ab20973 Binary files /dev/null and b/nhibernateg7/nhibernateg7/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/nhibernateg7/nhibernateg7/obj/Debug/MainWindow.g.i.cs b/nhibernateg7/nhibernateg7/obj/Debug/MainWindow.g.i.cs new file mode 100644 index 0000000..efc6222 --- /dev/null +++ b/nhibernateg7/nhibernateg7/obj/Debug/MainWindow.g.i.cs @@ -0,0 +1,75 @@ +#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "8055EBD817F301A14805ECBD531004363089DBCAEA3AEA8966A25607A87A4EE9" +//------------------------------------------------------------------------------ +// +// Este código fue generado por una herramienta. +// Versión de runtime:4.0.30319.42000 +// +// Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si +// se vuelve a generar el código. +// +//------------------------------------------------------------------------------ + +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; +using nhibernateg7; + + +namespace nhibernateg7 { + + + /// + /// MainWindow + /// + public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector { + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + if (_contentLoaded) { + return; + } + _contentLoaded = true; + System.Uri resourceLocater = new System.Uri("/nhibernateg7;component/mainwindow.xaml", System.UriKind.Relative); + + #line 1 "..\..\MainWindow.xaml" + System.Windows.Application.LoadComponent(this, resourceLocater); + + #line default + #line hidden + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] + void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { + this._contentLoaded = true; + } + } +} + diff --git a/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7.Properties.Resources.resources b/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7.Properties.Resources.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7.Properties.Resources.resources differ diff --git a/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7.csproj.CopyComplete b/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7.csproj.CoreCompileInputs.cache b/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..370dc55 --- /dev/null +++ b/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +c629b6c21f6574556983fdf977c484546da28986 diff --git a/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7.csproj.FileListAbsolute.txt b/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..c2d2234 --- /dev/null +++ b/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7.csproj.FileListAbsolute.txt @@ -0,0 +1,20 @@ +C:\Users\aguilera\source\repos\nhibernateg7\nhibernateg7\bin\Debug\nhibernateg7.exe.config +C:\Users\aguilera\source\repos\nhibernateg7\nhibernateg7\bin\Debug\nhibernateg7.exe +C:\Users\aguilera\source\repos\nhibernateg7\nhibernateg7\bin\Debug\nhibernateg7.pdb +C:\Users\aguilera\source\repos\nhibernateg7\nhibernateg7\bin\Debug\Antlr3.Runtime.dll +C:\Users\aguilera\source\repos\nhibernateg7\nhibernateg7\bin\Debug\Iesi.Collections.dll +C:\Users\aguilera\source\repos\nhibernateg7\nhibernateg7\bin\Debug\NHibernate.dll +C:\Users\aguilera\source\repos\nhibernateg7\nhibernateg7\bin\Debug\Remotion.Linq.dll +C:\Users\aguilera\source\repos\nhibernateg7\nhibernateg7\bin\Debug\Remotion.Linq.EagerFetching.dll +C:\Users\aguilera\source\repos\nhibernateg7\nhibernateg7\bin\Debug\Antlr3.Runtime.xml +C:\Users\aguilera\source\repos\nhibernateg7\nhibernateg7\bin\Debug\Iesi.Collections.xml +C:\Users\aguilera\source\repos\nhibernateg7\nhibernateg7\bin\Debug\NHibernate.xml +C:\Users\aguilera\source\repos\nhibernateg7\nhibernateg7\bin\Debug\Remotion.Linq.xml +C:\Users\aguilera\source\repos\nhibernateg7\nhibernateg7\bin\Debug\Remotion.Linq.EagerFetching.xml +C:\Users\aguilera\source\repos\nhibernateg7\nhibernateg7\obj\Debug\nhibernateg7.csprojAssemblyReference.cache +C:\Users\aguilera\source\repos\nhibernateg7\nhibernateg7\obj\Debug\nhibernateg7.Properties.Resources.resources +C:\Users\aguilera\source\repos\nhibernateg7\nhibernateg7\obj\Debug\nhibernateg7.csproj.GenerateResource.cache +C:\Users\aguilera\source\repos\nhibernateg7\nhibernateg7\obj\Debug\nhibernateg7.csproj.CoreCompileInputs.cache +C:\Users\aguilera\source\repos\nhibernateg7\nhibernateg7\obj\Debug\nhibernateg7.csproj.CopyComplete +C:\Users\aguilera\source\repos\nhibernateg7\nhibernateg7\obj\Debug\nhibernateg7.exe +C:\Users\aguilera\source\repos\nhibernateg7\nhibernateg7\obj\Debug\nhibernateg7.pdb diff --git a/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7.csproj.GenerateResource.cache b/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7.csproj.GenerateResource.cache new file mode 100644 index 0000000..7ae9239 Binary files /dev/null and b/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7.csproj.GenerateResource.cache differ diff --git a/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7.csprojAssemblyReference.cache b/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7.csprojAssemblyReference.cache new file mode 100644 index 0000000..53ef2f5 Binary files /dev/null and b/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7.csprojAssemblyReference.cache differ diff --git a/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7.exe b/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7.exe new file mode 100644 index 0000000..60566a2 Binary files /dev/null and b/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7.exe differ diff --git a/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7.pdb b/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7.pdb new file mode 100644 index 0000000..33352a2 Binary files /dev/null and b/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7.pdb differ diff --git a/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7_MarkupCompile.i.cache b/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7_MarkupCompile.i.cache new file mode 100644 index 0000000..e160535 --- /dev/null +++ b/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7_MarkupCompile.i.cache @@ -0,0 +1,20 @@ +nhibernateg7 + + +winexe +C# +.cs +C:\Users\aguilera\source\repos\nhibernateg7\nhibernateg7\obj\Debug\ +nhibernateg7 +none +false +DEBUG;TRACE + +11151548125 + +5-271610537 +13-1505183044 +MainWindow.xaml; + +True + diff --git a/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7_MarkupCompile.i.lref b/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7_MarkupCompile.i.lref new file mode 100644 index 0000000..a1337b8 --- /dev/null +++ b/nhibernateg7/nhibernateg7/obj/Debug/nhibernateg7_MarkupCompile.i.lref @@ -0,0 +1,4 @@ + + +FC:\Users\aguilera\source\repos\nhibernateg7\nhibernateg7\MainWindow.xaml;; + diff --git a/nhibernateg7/nhibernateg7/packages.config b/nhibernateg7/nhibernateg7/packages.config new file mode 100644 index 0000000..23ea25b --- /dev/null +++ b/nhibernateg7/nhibernateg7/packages.config @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/nhibernateg7/packages/Antlr3.Runtime.3.5.1/.signature.p7s b/nhibernateg7/packages/Antlr3.Runtime.3.5.1/.signature.p7s new file mode 100644 index 0000000..186744e Binary files /dev/null and b/nhibernateg7/packages/Antlr3.Runtime.3.5.1/.signature.p7s differ diff --git a/nhibernateg7/packages/Antlr3.Runtime.3.5.1/Antlr3.Runtime.3.5.1.nupkg b/nhibernateg7/packages/Antlr3.Runtime.3.5.1/Antlr3.Runtime.3.5.1.nupkg new file mode 100644 index 0000000..b37b2f6 Binary files /dev/null and b/nhibernateg7/packages/Antlr3.Runtime.3.5.1/Antlr3.Runtime.3.5.1.nupkg differ diff --git a/nhibernateg7/packages/Antlr3.Runtime.3.5.1/lib/net20/Antlr3.Runtime.dll b/nhibernateg7/packages/Antlr3.Runtime.3.5.1/lib/net20/Antlr3.Runtime.dll new file mode 100644 index 0000000..2bf359a Binary files /dev/null and b/nhibernateg7/packages/Antlr3.Runtime.3.5.1/lib/net20/Antlr3.Runtime.dll differ diff --git a/nhibernateg7/packages/Antlr3.Runtime.3.5.1/lib/net20/Antlr3.Runtime.xml b/nhibernateg7/packages/Antlr3.Runtime.3.5.1/lib/net20/Antlr3.Runtime.xml new file mode 100644 index 0000000..565e15d --- /dev/null +++ b/nhibernateg7/packages/Antlr3.Runtime.3.5.1/lib/net20/Antlr3.Runtime.xml @@ -0,0 +1,3249 @@ + + + + Antlr3.Runtime + + + + + This is a char buffer stream that is loaded from a file + all at once when you construct the object. This looks very + much like an ANTLReader or ANTLRInputStream, but it's a special case + since we know the exact size of the object to load. We can avoid lots + of data copying. + + + + + A kind of ReaderStream that pulls from an InputStream. + Useful for reading from stdin and specifying file encodings etc... + + + + + Vacuum all input from a Reader and then treat it like a StringStream. + Manage the buffer manually to avoid unnecessary data copying. + + + + If you need encoding, use ANTLRInputStream. + + + + + A pretty quick CharStream that pulls all data from an array + directly. Every method call counts in the lexer. Java's + strings aren't very good so I'm avoiding. + + + + The data being scanned + + + How many characters are actually in the buffer + + + 0..n-1 index into string of next char + + + line number 1..n within the input + + + The index of the character relative to the beginning of the line 0..n-1 + + + tracks how deep mark() calls are nested + + + + A list of CharStreamState objects that tracks the stream state + values line, charPositionInLine, and p that can change as you + move through the input stream. Indexed from 1..markDepth. + A null is kept @ index 0. Create upon first call to mark(). + + + + Track the last mark() call result value for use in rewind(). + + + What is name or source of this char stream? + + + Copy data in string to a local char array + + + This is the preferred constructor as no data is copied + + + + Return the current input symbol index 0..n where n indicates the + last symbol has been read. The index is the index of char to + be returned from LA(1). + + + + + Reset the stream so that it's in the same state it was + when the object was created *except* the data array is not + touched. + + + + + consume() ahead until p==index; can't just set p=index as we must + update line and charPositionInLine. + + + + + A generic recognizer that can handle recognizers generated from + lexer, parser, and tree grammars. This is all the parsing + support code essentially; most of it is error recovery stuff and + backtracking. + + + + + State of a lexer, parser, or tree parser are collected into a state + object so the state can be shared. This sharing is needed to + have one grammar import others and share same error variables + and other state variables. It's a kind of explicit multiple + inheritance via delegation of methods and shared state. + + + + reset the parser's state; subclasses must rewinds the input stream + + + + Match current input symbol against ttype. Attempt + single token insertion or deletion error recovery. If + that fails, throw MismatchedTokenException. + + + + To turn off single token insertion or deletion error + recovery, override recoverFromMismatchedToken() and have it + throw an exception. See TreeParser.recoverFromMismatchedToken(). + This way any error in a rule will cause an exception and + immediate exit from rule. Rule would recover by resynchronizing + to the set of symbols that can follow rule ref. + + + + Match the wildcard: in a symbol + + + Report a recognition problem. + + + This method sets errorRecovery to indicate the parser is recovering + not parsing. Once in recovery mode, no errors are generated. + To get out of recovery mode, the parser must successfully match + a token (after a resync). So it will go: + + 1. error occurs + 2. enter recovery mode, report error + 3. consume until token found in resynch set + 4. try to resume parsing + 5. next match() will reset errorRecovery mode + + If you override, make sure to update syntaxErrors if you care about that. + + + + What error message should be generated for the various exception types? + + + Not very object-oriented code, but I like having all error message + generation within one method rather than spread among all of the + exception classes. This also makes it much easier for the exception + handling because the exception classes do not have to have pointers back + to this object to access utility routines and so on. Also, changing + the message for an exception type would be difficult because you + would have to subclassing exception, but then somehow get ANTLR + to make those kinds of exception objects instead of the default. + This looks weird, but trust me--it makes the most sense in terms + of flexibility. + + For grammar debugging, you will want to override this to add + more information such as the stack frame with + getRuleInvocationStack(e, this.getClass().getName()) and, + for no viable alts, the decision description and state etc... + + Override this to change the message generated for one or more + exception types. + + + + + Get number of recognition errors (lexer, parser, tree parser). Each + recognizer tracks its own number. So parser and lexer each have + separate count. Does not count the spurious errors found between + an error and next valid token match + + + + + + What is the error header, normally line/character position information? + + + + How should a token be displayed in an error message? The default + is to display just the text, but during development you might + want to have a lot of information spit out. Override in that case + to use t.ToString() (which, for CommonToken, dumps everything about + the token). This is better than forcing you to override a method in + your token objects because you don't have to go modify your lexer + so that it creates a new Java type. + + + + Override this method to change where error messages go + + + + Recover from an error found on the input stream. This is + for NoViableAlt and mismatched symbol exceptions. If you enable + single token insertion and deletion, this will usually not + handle mismatched symbol exceptions but there could be a mismatched + token that the match() routine could not recover from. + + + + + A hook to listen in on the token consumption during error recovery. + The DebugParser subclasses this to fire events to the listenter. + + + + + Compute the context-sensitive FOLLOW set for current rule. + This is set of token types that can follow a specific rule + reference given a specific call chain. You get the set of + viable tokens that can possibly come next (lookahead depth 1) + given the current call chain. Contrast this with the + definition of plain FOLLOW for rule r: + + + FOLLOW(r)={x | S=>*alpha r beta in G and x in FIRST(beta)} + + where x in T* and alpha, beta in V*; T is set of terminals and + V is the set of terminals and nonterminals. In other words, + FOLLOW(r) is the set of all tokens that can possibly follow + references to r in *any* sentential form (context). At + runtime, however, we know precisely which context applies as + we have the call chain. We may compute the exact (rather + than covering superset) set of following tokens. + + For example, consider grammar: + + stat : ID '=' expr ';' // FOLLOW(stat)=={EOF} + | "return" expr '.' + ; + expr : atom ('+' atom)* ; // FOLLOW(expr)=={';','.',')'} + atom : INT // FOLLOW(atom)=={'+',')',';','.'} + | '(' expr ')' + ; + + The FOLLOW sets are all inclusive whereas context-sensitive + FOLLOW sets are precisely what could follow a rule reference. + For input input "i=(3);", here is the derivation: + + stat => ID '=' expr ';' + => ID '=' atom ('+' atom)* ';' + => ID '=' '(' expr ')' ('+' atom)* ';' + => ID '=' '(' atom ')' ('+' atom)* ';' + => ID '=' '(' INT ')' ('+' atom)* ';' + => ID '=' '(' INT ')' ';' + + At the "3" token, you'd have a call chain of + + stat -> expr -> atom -> expr -> atom + + What can follow that specific nested ref to atom? Exactly ')' + as you can see by looking at the derivation of this specific + input. Contrast this with the FOLLOW(atom)={'+',')',';','.'}. + + You want the exact viable token set when recovering from a + token mismatch. Upon token mismatch, if LA(1) is member of + the viable next token set, then you know there is most likely + a missing token in the input stream. "Insert" one by just not + throwing an exception. + + + Attempt to recover from a single missing or extra token. + + EXTRA TOKEN + + LA(1) is not what we are looking for. If LA(2) has the right token, + however, then assume LA(1) is some extra spurious token. Delete it + and LA(2) as if we were doing a normal match(), which advances the + input. + + MISSING TOKEN + + If current token is consistent with what could come after + ttype then it is ok to "insert" the missing token, else throw + exception For example, Input "i=(3;" is clearly missing the + ')'. When the parser returns from the nested call to expr, it + will have call chain: + + stat -> expr -> atom + + and it will be trying to match the ')' at this point in the + derivation: + + => ID '=' '(' INT ')' ('+' atom)* ';' + ^ + match() will see that ';' doesn't match ')' and report a + mismatched token error. To recover, it sees that LA(1)==';' + is in the set of tokens that can follow the ')' token + reference in rule atom. It can assume that you forgot the ')'. + + + Not currently used + + + + Match needs to return the current input symbol, which gets put + into the label for the associated token ref; e.g., x=ID. Token + and tree parsers need to return different objects. Rather than test + for input stream type or change the IntStream interface, I use + a simple method to ask the recognizer to tell me what the current + input symbol is. + + + This is ignored for lexers. + + + Conjure up a missing token during error recovery. + + + The recognizer attempts to recover from single missing + symbols. But, actions might refer to that missing symbol. + For example, x=ID {f($x);}. The action clearly assumes + that there has been an identifier matched previously and that + $x points at that token. If that token is missing, but + the next token in the stream is what we want we assume that + this token is missing and we keep going. Because we + have to return some token to replace the missing token, + we have to conjure one up. This method gives the user control + over the tokens returned for missing tokens. Mostly, + you will want to create something special for identifier + tokens. For literals such as '{' and ',', the default + action in the parser or tree parser works. It simply creates + a CommonToken of the appropriate type. The text will be the token. + If you change what tokens must be created by the lexer, + override this method to create the appropriate tokens. + + + + Consume tokens until one matches the given token set + + + Push a rule's follow set using our own hardcoded stack + + + + Return of the rules in your parser instance + leading up to a call to this method. You could override if + you want more details such as the file/line info of where + in the parser java code a rule is invoked. + + + + This is very useful for error messages and for context-sensitive + error recovery. + + + + + A more general version of GetRuleInvocationStack where you can + pass in the StackTrace of, for example, a RecognitionException + to get it's rule stack trace. + + + + Return whether or not a backtracking attempt failed. + + + + Used to print out token names like ID during debugging and + error reporting. The generated parsers implement a method + that overrides this to point to their String[] tokenNames. + + + + + For debugging and other purposes, might want the grammar name. + Have ANTLR generate an implementation for this method. + + + + + A convenience method for use most often with template rewrites. + Convert a list of to a list of . + + + + + Given a rule number and a start token index number, return + MEMO_RULE_UNKNOWN if the rule has not parsed input starting from + start index. If this rule has parsed input starting from the + start index before, then return where the rule stopped parsing. + It returns the index of the last token matched by the rule. + + + + For now we use a hashtable and just the slow Object-based one. + Later, we can make a special one for ints and also one that + tosses out data after we commit past input position i. + + + + + Has this rule already parsed input at the current index in the + input stream? Return the stop token index or MEMO_RULE_UNKNOWN. + If we attempted but failed to parse properly before, return + MEMO_RULE_FAILED. + + + + This method has a side-effect: if we have seen this input for + this rule and successfully parsed before, then seek ahead to + 1 past the stop token matched for this rule last time. + + + + + Record whether or not this rule parsed the input at this position + successfully. Use a standard java hashtable for now. + + + + return how many rule/input-index pairs there are in total. + TODO: this includes synpreds. :( + + + + A stripped-down version of org.antlr.misc.BitSet that is just + good enough to handle runtime requirements such as FOLLOW sets + for automatic error recovery. + + + + + We will often need to do a mod operator (i mod nbits). Its + turns out that, for powers of two, this mod operation is + same as (i & (nbits-1)). Since mod is slow, we use a + precomputed mod mask to do the mod instead. + + + + The actual data bits + + + Construct a bitset of size one word (64 bits) + + + Construction from a static array of longs + + + Construction from a list of integers + + + Construct a bitset given the size + The size of the bitset in bits + + + return this | a in a new set + + + or this element into this set (grow as necessary to accommodate) + + + Grows the set to a larger number of bits. + element that must fit in set + + + Sets the size of a set. + how many words the new set should be + + + return how much space is being used by the bits array not how many actually have member bits on. + + + Is this contained within a? + + + Buffer all input tokens but do on-demand fetching of new tokens from + lexer. Useful when the parser or lexer has to set context/mode info before + proper lexing of future tokens. The ST template parser needs this, + for example, because it has to constantly flip back and forth between + inside/output templates. E.g., <names:{hi, <it>}> has to parse names + as part of an expression but "hi, <it>" as a nested template. + + You can't use this stream if you pass whitespace or other off-channel + tokens to the parser. The stream can't ignore off-channel tokens. + (UnbufferedTokenStream is the same way.) + + This is not a subclass of UnbufferedTokenStream because I don't want + to confuse small moving window of tokens it uses for the full buffer. + + + Record every single token pulled from the source so we can reproduce + chunks of it later. The buffer in LookaheadStream overlaps sometimes + as its moving window moves through the input. This list captures + everything so we can access complete input text. + + + Track the last mark() call result value for use in rewind(). + + + The index into the tokens list of the current token (next token + to consume). tokens[p] should be LT(1). p=-1 indicates need + to initialize with first token. The ctor doesn't get a token. + First call to LT(1) or whatever gets the first token and sets p=0; + + + + How deep have we gone? + + + + Move the input pointer to the next incoming token. The stream + must become active with LT(1) available. consume() simply + moves the input pointer so that LT(1) points at the next + input symbol. Consume at least one token. + + Walk past any token not on the channel the parser is listening to. + + + Make sure index i in tokens has a token. + + + add n elements to buffer + + + Given a start and stop index, return a List of all tokens in + the token type BitSet. Return null if no tokens were found. This + method looks at both on and off channel tokens. + + + + When walking ahead with cyclic DFA or for syntactic predicates, + we need to record the state of the input stream (char index, + line, etc...) so that we can rewind the state after scanning ahead. + + + This is the complete state of a stream. + + + Index into the char stream of next lookahead char + + + What line number is the scanner at before processing buffer[p]? + + + What char position 0..n-1 in line is scanner before processing buffer[p]? + + + + A Token object like we'd use in ANTLR 2.x; has an actual string created + and associated with this object. These objects are needed for imaginary + tree nodes that have payload objects. We need to create a Token object + that has a string; the tree node will point at this token. CommonToken + has indexes into a char stream and hence cannot be used to introduce + new strings. + + + + What token number is this from 0..n-1 tokens + + + + We need to be able to change the text once in a while. If + this is non-null, then getText should return this. Note that + start/stop are not affected by changing this. + + + + What token number is this from 0..n-1 tokens; < 0 implies invalid index + + + The char position into the input buffer where this token starts + + + The char position into the input buffer where this token stops + + + + The most common stream of tokens is one where every token is buffered up + and tokens are prefiltered for a certain channel (the parser will only + see these tokens and cannot change the filter channel number during the + parse). + + + TODO: how to access the full token stream? How to track all tokens matched per rule? + + + Skip tokens on any channel but this one; this is how we skip whitespace... + + + Reset this token stream by setting its token source. + + + Always leave p on an on-channel token. + + + Given a starting index, return the index of the first on-channel + token. + + + All debugging events that a recognizer can trigger. + + + I did not create a separate AST debugging interface as it would create + lots of extra classes and DebugParser has a dbg var defined, which makes + it hard to change to ASTDebugEventListener. I looked hard at this issue + and it is easier to understand as one monolithic event interface for all + possible events. Hopefully, adding ST debugging stuff won't be bad. Leave + for future. 4/26/2006. + + + + + The parser has just entered a rule. No decision has been made about + which alt is predicted. This is fired AFTER init actions have been + executed. Attributes are defined and available etc... + The grammarFileName allows composite grammars to jump around among + multiple grammar files. + + + + + Because rules can have lots of alternatives, it is very useful to + know which alt you are entering. This is 1..n for n alts. + + + + + This is the last thing executed before leaving a rule. It is + executed even if an exception is thrown. This is triggered after + error reporting and recovery have occurred (unless the exception is + not caught in this rule). This implies an "exitAlt" event. + The grammarFileName allows composite grammars to jump around among + multiple grammar files. + + + + Track entry into any (...) subrule other EBNF construct + + + + Every decision, fixed k or arbitrary, has an enter/exit event + so that a GUI can easily track what LT/consume events are + associated with prediction. You will see a single enter/exit + subrule but multiple enter/exit decision events, one for each + loop iteration. + + + + + An input token was consumed; matched by any kind of element. + Trigger after the token was matched by things like match(), matchAny(). + + + + + An off-channel input token was consumed. + Trigger after the token was matched by things like match(), matchAny(). + (unless of course the hidden token is first stuff in the input stream). + + + + + Somebody (anybody) looked ahead. Note that this actually gets + triggered by both LA and LT calls. The debugger will want to know + which Token object was examined. Like consumeToken, this indicates + what token was seen at that depth. A remote debugger cannot look + ahead into a file it doesn't have so LT events must pass the token + even if the info is redundant. + + + + + The parser is going to look arbitrarily ahead; mark this location, + the token stream's marker is sent in case you need it. + + + + + After an arbitrairly long lookahead as with a cyclic DFA (or with + any backtrack), this informs the debugger that stream should be + rewound to the position associated with marker. + + + + + Rewind to the input position of the last marker. + Used currently only after a cyclic DFA and just + before starting a sem/syn predicate to get the + input position back to the start of the decision. + Do not "pop" the marker off the state. mark(i) + and rewind(i) should balance still. + + + + + To watch a parser move through the grammar, the parser needs to + inform the debugger what line/charPos it is passing in the grammar. + For now, this does not know how to switch from one grammar to the + other and back for island grammars etc... + + + + This should also allow breakpoints because the debugger can stop + the parser whenever it hits this line/pos. + + + + + A recognition exception occurred such as NoViableAltException. I made + this a generic event so that I can alter the exception hierachy later + without having to alter all the debug objects. + + + + Upon error, the stack of enter rule/subrule must be properly unwound. + If no viable alt occurs it is within an enter/exit decision, which + also must be rewound. Even the rewind for each mark must be unwount. + In the Java target this is pretty easy using try/finally, if a bit + ugly in the generated code. The rewind is generated in DFA.predict() + actually so no code needs to be generated for that. For languages + w/o this "finally" feature (C++?), the target implementor will have + to build an event stack or something. + + Across a socket for remote debugging, only the RecognitionException + data fields are transmitted. The token object or whatever that + caused the problem was the last object referenced by LT. The + immediately preceding LT event should hold the unexpected Token or + char. + + Here is a sample event trace for grammar: + + b : C ({;}A|B) // {;} is there to prevent A|B becoming a set + | D + ; + + The sequence for this rule (with no viable alt in the subrule) for + input 'c c' (there are 3 tokens) is: + + commence + LT(1) + enterRule b + location 7 1 + enter decision 3 + LT(1) + exit decision 3 + enterAlt1 + location 7 5 + LT(1) + consumeToken [c/<4>,1:0] + location 7 7 + enterSubRule 2 + enter decision 2 + LT(1) + LT(1) + recognitionException NoViableAltException 2 1 2 + exit decision 2 + exitSubRule 2 + beginResync + LT(1) + consumeToken [c/<4>,1:1] + LT(1) + endResync + LT(-1) + exitRule b + terminate + + + + + Indicates the recognizer is about to consume tokens to resynchronize + the parser. Any consume events from here until the recovered event + are not part of the parse--they are dead tokens. + + + + + Indicates that the recognizer has finished consuming tokens in order + to resychronize. There may be multiple beginResync/endResync pairs + before the recognizer comes out of errorRecovery mode (in which + multiple errors are suppressed). This will be useful + in a gui where you want to probably grey out tokens that are consumed + but not matched to anything in grammar. Anything between + a beginResync/endResync pair was tossed out by the parser. + + + + A semantic predicate was evaluate with this result and action text + + + + Announce that parsing has begun. Not technically useful except for + sending events over a socket. A GUI for example will launch a thread + to connect and communicate with a remote parser. The thread will want + to notify the GUI when a connection is made. ANTLR parsers + trigger this upon entry to the first rule (the ruleLevel is used to + figure this out). + + + + + Parsing is over; successfully or not. Mostly useful for telling + remote debugging listeners that it's time to quit. When the rule + invocation level goes to zero at the end of a rule, we are done + parsing. + + + + + Input for a tree parser is an AST, but we know nothing for sure + about a node except its type and text (obtained from the adaptor). + This is the analog of the consumeToken method. Again, the ID is + the hashCode usually of the node so it only works if hashCode is + not implemented. If the type is UP or DOWN, then + the ID is not really meaningful as it's fixed--there is + just one UP node and one DOWN navigation node. + + + + + + + The tree parser lookedahead. If the type is UP or DOWN, + then the ID is not really meaningful as it's fixed--there is + just one UP node and one DOWN navigation node. + + + + + A nil was created (even nil nodes have a unique ID... + they are not "null" per se). As of 4/28/2006, this + seems to be uniquely triggered when starting a new subtree + such as when entering a subrule in automatic mode and when + building a tree in rewrite mode. + + + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only t.ID is set. + + + + + Upon syntax error, recognizers bracket the error with an error node + if they are building ASTs. + + + + + + Announce a new node built from token elements such as type etc... + + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only t.ID, type, text are + set. + + + + Announce a new node built from an existing token. + + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only node.ID and token.tokenIndex + are set. + + + + Make a node the new root of an existing root. See + + + Note: the newRootID parameter is possibly different + than the TreeAdaptor.becomeRoot() newRoot parameter. + In our case, it will always be the result of calling + TreeAdaptor.becomeRoot() and not root_n or whatever. + + The listener should assume that this event occurs + only when the current subrule (or rule) subtree is + being reset to newRootID. + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only IDs are set. + + + + + + Make childID a child of rootID. + + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only IDs are set. + + + + + + Set the token start/stop token index for a subtree root or node. + + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only t.ID is set. + + + + A DFA implemented as a set of transition tables. + + + Any state that has a semantic predicate edge is special; those states + are generated with if-then-else structures in a specialStateTransition() + which is generated by cyclicDFA template. + + There are at most 32767 states (16-bit signed short). + Could get away with byte sometimes but would have to generate different + types and the simulation code too. For a point of reference, the Java + lexer's Tokens rule DFA has 326 states roughly. + + + + Which recognizer encloses this DFA? Needed to check backtracking + + + + From the input stream, predict what alternative will succeed + using this DFA (representing the covering regular approximation + to the underlying CFL). Return an alternative number 1..n. Throw + an exception upon error. + + + + A hook for debugging interface + + + + Given a String that has a run-length-encoding of some unsigned shorts + like "\1\2\3\9", convert to short[] {2,9,9,9}. We do this to avoid + static short[] which generates so much init code that the class won't + compile. :( + + + + Hideous duplication of code, but I need different typed arrays out :( + + + The recognizer did not match anything for a (..)+ loop. + + + + A semantic predicate failed during validation. Validation of predicates + occurs when normally parsing the alternative just like matching a token. + Disambiguating predicate evaluation occurs when we hoist a predicate into + a prediction decision. + + + + AST rules have trees + + + Has a value potentially if output=AST; + + + AST rules have trees + + + Has a value potentially if output=AST; + + + A source of characters for an ANTLR lexer + + + + For infinite streams, you don't need this; primarily I'm providing + a useful interface for action code. Just make sure actions don't + use this on streams that don't support it. + + + + + Get the ith character of lookahead. This is the same usually as + LA(i). This will be used for labels in the generated + lexer code. I'd prefer to return a char here type-wise, but it's + probably better to be 32-bit clean and be consistent with LA. + + + + ANTLR tracks the line information automatically + Because this stream can rewind, we need to be able to reset the line + + + The index of the character relative to the beginning of the line 0..n-1 + + + + A simple stream of integers used when all I care about is the char + or token type sequence (such as interpretation). + + + + + Get int at current input pointer + i ahead where i=1 is next int. + Negative indexes are allowed. LA(-1) is previous token (token + just matched). LA(-i) where i is before first token should + yield -1, invalid char / EOF. + + + + + Tell the stream to start buffering if it hasn't already. Return + current input position, Index, or some other marker so that + when passed to rewind() you get back to the same spot. + rewind(mark()) should not affect the input cursor. The Lexer + track line/col info as well as input index so its markers are + not pure input indexes. Same for tree node streams. + + + + + Return the current input symbol index 0..n where n indicates the + last symbol has been read. The index is the symbol about to be + read not the most recently read symbol. + + + + + Reset the stream so that next call to index would return marker. + The marker will usually be Index but it doesn't have to be. It's + just a marker to indicate what state the stream was in. This is + essentially calling release() and seek(). If there are markers + created after this marker argument, this routine must unroll them + like a stack. Assume the state the stream was in when this marker + was created. + + + + + Rewind to the input position of the last marker. + Used currently only after a cyclic DFA and just + before starting a sem/syn predicate to get the + input position back to the start of the decision. + Do not "pop" the marker off the state. mark(i) + and rewind(i) should balance still. It is + like invoking rewind(last marker) but it should not "pop" + the marker off. It's like seek(last marker's input position). + + + + + You may want to commit to a backtrack but don't want to force the + stream to keep bookkeeping objects around for a marker that is + no longer necessary. This will have the same behavior as + rewind() except it releases resources without the backward seek. + This must throw away resources for all markers back to the marker + argument. So if you're nested 5 levels of mark(), and then release(2) + you have to release resources for depths 2..5. + + + + + Set the input cursor to the position indicated by index. This is + normally used to seek ahead in the input stream. No buffering is + required to do this unless you know your stream will use seek to + move backwards such as when backtracking. + + + + This is different from rewind in its multi-directional + requirement and in that its argument is strictly an input cursor (index). + + For char streams, seeking forward must update the stream state such + as line number. For seeking backwards, you will be presumably + backtracking using the mark/rewind mechanism that restores state and + so this method does not need to update state when seeking backwards. + + Currently, this method is only used for efficient backtracking using + memoization, but in the future it may be used for incremental parsing. + + The index is 0..n-1. A seek to position i means that LA(1) will + return the ith symbol. So, seeking to 0 means LA(1) will return the + first element in the stream. + + + + + Only makes sense for streams that buffer everything up probably, but + might be useful to display the entire stream or for testing. This + value includes a single EOF. + + + + + Where are you getting symbols from? Normally, implementations will + pass the buck all the way to the lexer who can ask its input stream + for the file name or whatever. + + + + + Rules can have start/stop info. + + + + + Gets the start element from the input stream + + + + + Gets the stop element from the input stream + + + + + Rules can have start/stop info. + + The element type of the input stream. + + + + Gets the start element from the input stream + + + + + Gets the stop element from the input stream + + + + Get the text of the token + + + The line number on which this token was matched; line=1..n + + + The index of the first character relative to the beginning of the line 0..n-1 + + + + An index from 0..n-1 of the token object in the input stream. + This must be valid in order to use the ANTLRWorks debugger. + + + + + From what character stream was this token created? You don't have to + implement but it's nice to know where a Token comes from if you have + include files etc... on the input. + + + + + A source of tokens must provide a sequence of tokens via nextToken() + and also must reveal it's source of characters; CommonToken's text is + computed from a CharStream; it only store indices into the char stream. + + + + Errors from the lexer are never passed to the parser. Either you want + to keep going or you do not upon token recognition error. If you do not + want to continue lexing then you do not want to continue parsing. Just + throw an exception not under RecognitionException and Java will naturally + toss you all the way out of the recognizers. If you want to continue + lexing then you should not throw an exception to the parser--it has already + requested a token. Keep lexing until you get a valid one. Just report + errors and keep going, looking for a valid token. + + + + + Return a Token object from your input stream (usually a CharStream). + Do not fail/return upon lexing error; keep chewing on the characters + until you get a good one; errors are not passed through to the parser. + + + + + Where are you getting tokens from? normally the implication will simply + ask lexers input stream. + + + + A stream of tokens accessing tokens from a TokenSource + + + Get Token at current input pointer + i ahead where i=1 is next Token. + i<0 indicates tokens in the past. So -1 is previous token and -2 is + two tokens ago. LT(0) is undefined. For i>=n, return Token.EOFToken. + Return null for LT(0) and any index that results in an absolute address + that is negative. + + + + How far ahead has the stream been asked to look? The return + value is a valid index from 0..n-1. + + + + + Get a token at an absolute index i; 0..n-1. This is really only + needed for profiling and debugging and token stream rewriting. + If you don't want to buffer up tokens, then this method makes no + sense for you. Naturally you can't use the rewrite stream feature. + I believe DebugTokenStream can easily be altered to not use + this method, removing the dependency. + + + + + Where is this stream pulling tokens from? This is not the name, but + the object that provides Token objects. + + + + + Return the text of all tokens from start to stop, inclusive. + If the stream does not buffer all the tokens then it can just + return "" or null; Users should not access $ruleLabel.text in + an action of course in that case. + + + + + Because the user is not required to use a token with an index stored + in it, we must provide a means for two token objects themselves to + indicate the start/end location. Most often this will just delegate + to the other toString(int,int). This is also parallel with + the TreeNodeStream.toString(Object,Object). + + + + + The most common stream of tokens is one where every token is buffered up + and tokens are prefiltered for a certain channel (the parser will only + see these tokens and cannot change the filter channel number during the + parse). + + + TODO: how to access the full token stream? How to track all tokens matched per rule? + + + + Record every single token pulled from the source so we can reproduce + chunks of it later. + + + + Map from token type to channel to override some Tokens' channel numbers + + + Set of token types; discard any tokens with this type + + + Skip tokens on any channel but this one; this is how we skip whitespace... + + + By default, track all incoming tokens + + + Track the last mark() call result value for use in rewind(). + + + + The index into the tokens list of the current token (next token + to consume). p==-1 indicates that the tokens list is empty + + + + + How deep have we gone? + + + + Reset this token stream by setting its token source. + + + + Load all tokens from the token source and put in tokens. + This is done upon first LT request because you might want to + set some token type / channel overrides before filling buffer. + + + + + Move the input pointer to the next incoming token. The stream + must become active with LT(1) available. consume() simply + moves the input pointer so that LT(1) points at the next + input symbol. Consume at least one token. + + + + Walk past any token not on the channel the parser is listening to. + + + + Given a starting index, return the index of the first on-channel token. + + + + A simple filter mechanism whereby you can tell this token stream + to force all tokens of type ttype to be on channel. For example, + when interpreting, we cannot exec actions so we need to tell + the stream to force all WS and NEWLINE to be a different, ignored + channel. + + + + + Given a start and stop index, return a List of all tokens in + the token type BitSet. Return null if no tokens were found. This + method looks at both on and off channel tokens. + + + + + Get the ith token from the current position 1..n where k=1 is the + first symbol of lookahead. + + + + Look backwards k tokens on-channel tokens + + + + Return absolute token i; ignore which channel the tokens are on; + that is, count all tokens not just on-channel tokens. + + + + + A lexer is recognizer that draws input symbols from a character stream. + lexer grammars result in a subclass of this object. A Lexer object + uses simplified match() and error recovery mechanisms in the interest + of speed. + + + + Where is the lexer drawing characters from? + + + + Gets or sets the text matched so far for the current token or any text override. + + + Setting this value replaces any previously set value, and overrides the original text. + + + + Return a token from this source; i.e., match a token on the char stream. + + + Returns the EOF token (default), if you need + to return a custom token instead override this method. + + + + Instruct the lexer to skip creating a token for current lexer rule + and look for another token. nextToken() knows to keep looking when + a lexer rule finishes with token set to SKIP_TOKEN. Recall that + if token==null at end of any token rule, it creates one for you + and emits it. + + + + This is the lexer entry point that sets instance var 'token' + + + + Currently does not support multiple emits per nextToken invocation + for efficiency reasons. Subclass and override this method and + nextToken (to push tokens into a list and pull from that list rather + than a single variable as this implementation does). + + + + + The standard method called to automatically emit a token at the + outermost lexical rule. The token object should point into the + char buffer start..stop. If there is a text override in 'text', + use that to set the token's text. Override this method to emit + custom Token objects. + + + + If you are building trees, then you should also override + Parser or TreeParser.getMissingSymbol(). + + + + What is the index of the current character of lookahead? + + + + Lexers can normally match any char in it's vocabulary after matching + a token, so do the easy thing and just kill a character and hope + it all works out. You can instead use the rule invocation stack + to do sophisticated error recovery if you are in a fragment rule. + + + + A queue that can dequeue and get(i) in O(1) and grow arbitrarily large. + A linked list is fast at dequeue but slow at get(i). An array is + the reverse. This is O(1) for both operations. + + List grows until you dequeue last element at end of buffer. Then + it resets to start filling at 0 again. If adds/removes are balanced, the + buffer will not grow too large. + + No iterator stuff as that's not how we'll use it. + + + dynamically-sized buffer of elements + + + index of next element to fill + + + + How deep have we gone? + + + + + Return element {@code i} elements ahead of current element. {@code i==0} + gets current element. This is not an absolute index into {@link #data} + since {@code p} defines the start of the real list. + + + + Get and remove first element in queue + + + Return string of current buffer contents; non-destructive + + + + A lookahead queue that knows how to mark/release locations in the buffer for + backtracking purposes. Any markers force the {@link FastQueue} superclass to + keep all elements until no more markers; then can reset to avoid growing a + huge buffer. + + + + Absolute token index. It's the index of the symbol about to be + read via {@code LT(1)}. Goes from 0 to numtokens. + + + This is the {@code LT(-1)} element for the first element in {@link #data}. + + + Track object returned by nextElement upon end of stream; + Return it later when they ask for LT passed end of input. + + + Track the last mark() call result value for use in rewind(). + + + tracks how deep mark() calls are nested + + + + Implement nextElement to supply a stream of elements to this + lookahead buffer. Return EOF upon end of the stream we're pulling from. + + + + + Get and remove first element in queue; override + {@link FastQueue#remove()}; it's the same, just checks for backtracking. + + + + Make sure we have at least one element to remove, even if EOF + + + + Make sure we have 'need' elements from current position p. Last valid + p index is data.size()-1. p+need-1 is the data index 'need' elements + ahead. If we need 1 element, (p+1-1)==p must be < data.size(). + + + + add n elements to buffer + + + Size of entire stream is unknown; we only know buffer size from FastQueue + + + + Seek to a 0-indexed absolute token index. Normally used to seek backwards + in the buffer. Does not force loading of nodes. + + + To preserve backward compatibility, this method allows seeking past the + end of the currently buffered data. In this case, the input pointer will + be moved but the data will only actually be loaded upon the next call to + {@link #consume} or {@link #LT} for {@code k>0}. + + + + A mismatched char or Token or tree node + + + + We were expecting a token but it's not found. The current token + is actually what we wanted next. Used for tree node errors too. + + + + + A parser for TokenStreams. "parser grammars" result in a subclass + of this. + + + + Gets or sets the token stream; resets the parser upon a set. + + + + Rules that return more than a single value must return an object + containing all the values. Besides the properties defined in + RuleLabelScope.predefinedRulePropertiesScope there may be user-defined + return values. This class simply defines the minimum properties that + are always defined and methods to access the others that might be + available depending on output option such as template and tree. + + + + Note text is not an actual property of the return value, it is computed + from start and stop using the input stream's toString() method. I + could add a ctor to this so that we can pass in and store the input + stream, but I'm not sure we want to do that. It would seem to be undefined + to get the .text property anyway if the rule matches tokens from multiple + input streams. + + I do not use getters for fields of objects that are used simply to + group values such as this aggregate. The getters/setters are there to + satisfy the superclass interface. + + + + The root of the ANTLR exception hierarchy. + + + To avoid English-only error messages and to generally make things + as flexible as possible, these exceptions are not created with strings, + but rather the information necessary to generate an error. Then + the various reporting methods in Parser and Lexer can be overridden + to generate a localized error message. For example, MismatchedToken + exceptions are built with the expected token type. + So, don't expect getMessage() to return anything. + + Note that as of Java 1.4, you can access the stack trace, which means + that you can compute the complete trace of rules from the start symbol. + This gives you considerable context information with which to generate + useful error messages. + + ANTLR generates code that throws exceptions upon recognition error and + also generates code to catch these exceptions in each rule. If you + want to quit upon first error, you can turn off the automatic error + handling mechanism using rulecatch action, but you still need to + override methods mismatch and recoverFromMismatchSet. + + In general, the recognition exceptions can track where in a grammar a + problem occurred and/or what was the expected input. While the parser + knows its state (such as current input symbol and line info) that + state can change before the exception is reported so current token index + is computed and stored at exception time. From this info, you can + perhaps print an entire line of input not just a single token, for example. + Better to just say the recognizer had a problem and then let the parser + figure out a fancy report. + + + + What input stream did the error occur in? + + + + What was the lookahead index when this exception was thrown? + + + + What is index of token/char were we looking at when the error occurred? + + + + The current Token when an error occurred. Since not all streams + can retrieve the ith Token, we have to track the Token object. + For parsers. Even when it's a tree parser, token might be set. + + + + + If this is a tree parser exception, node is set to the node with + the problem. + + + + The current char when an error occurred. For lexers. + + + + Track the line (1-based) at which the error occurred in case this is + generated from a lexer. We need to track this since the + unexpected char doesn't carry the line info. + + + + + The 0-based index into the line where the error occurred. + + + + + If you are parsing a tree node stream, you will encounter som + imaginary nodes w/o line/col info. We now search backwards looking + for most recent token with line/col info, but notify getErrorHeader() + that info is approximate. + + + + Used for remote debugger deserialization + + + Return the token type or char of the unexpected input element + + + + The set of fields needed by an abstract recognizer to recognize input + and recover from errors etc... As a separate state object, it can be + shared among multiple grammars; e.g., when one grammar imports another. + + + + These fields are publically visible but the actual state pointer per + parser is protected. + + + + + Track the set of token types that can follow any rule invocation. + Stack grows upwards. When it hits the max, it grows 2x in size + and keeps going. + + + + + This is true when we see an error and before having successfully + matched a token. Prevents generation of more than one error message + per error. + + + + + The index into the input stream where the last error occurred. + This is used to prevent infinite loops where an error is found + but no token is consumed during recovery...another error is found, + ad naseum. This is a failsafe mechanism to guarantee that at least + one token/tree node is consumed for two errors. + + + + + In lieu of a return value, this indicates that a rule or token + has failed to match. Reset to false upon valid token match. + + + + Did the recognizer encounter a syntax error? Track how many. + + + + If 0, no backtracking is going on. Safe to exec actions etc... + If >0 then it's the level of backtracking. + + + + + An array[size num rules] of dictionaries that tracks + the stop token index for each rule. ruleMemo[ruleIndex] is + the memoization table for ruleIndex. For key ruleStartIndex, you + get back the stop token for associated rule or MEMO_RULE_FAILED. + + + This is only used if rule memoization is on (which it is by default). + + + + The goal of all lexer rules/methods is to create a token object. + This is an instance variable as multiple rules may collaborate to + create a single token. nextToken will return this object after + matching lexer rule(s). If you subclass to allow multiple token + emissions, then set this to the last token to be matched or + something nonnull so that the auto token emit mechanism will not + emit another token. + + + + + What character index in the stream did the current token start at? + Needed, for example, to get the text for current token. Set at + the start of nextToken. + + + + The line on which the first character of the token resides + + + The character position of first character within the line + + + The channel number for the current token + + + The token type for the current token + + + + You can set the text for the current token to override what is in + the input char buffer. Use setText() or can set this instance var. + + + + + All tokens go to the parser (unless skip() is called in that rule) + on a particular "channel". The parser tunes to a particular channel + so that whitespace etc... can go to the parser on a "hidden" channel. + + + + + Anything on different channel than DEFAULT_CHANNEL is not parsed + by parser. + + + + Useful for dumping out the input stream after doing some + augmentation or other manipulations. + + You can insert stuff, replace, and delete chunks. Note that the + operations are done lazily--only if you convert the buffer to a + String. This is very efficient because you are not moving data around + all the time. As the buffer of tokens is converted to strings, the + toString() method(s) check to see if there is an operation at the + current index. If so, the operation is done and then normal String + rendering continues on the buffer. This is like having multiple Turing + machine instruction streams (programs) operating on a single input tape. :) + + Since the operations are done lazily at toString-time, operations do not + screw up the token index values. That is, an insert operation at token + index i does not change the index values for tokens i+1..n-1. + + Because operations never actually alter the buffer, you may always get + the original token stream back without undoing anything. Since + the instructions are queued up, you can easily simulate transactions and + roll back any changes if there is an error just by removing instructions. + For example, + + CharStream input = new ANTLRFileStream("input"); + TLexer lex = new TLexer(input); + TokenRewriteStream tokens = new TokenRewriteStream(lex); + T parser = new T(tokens); + parser.startRule(); + + Then in the rules, you can execute + Token t,u; + ... + input.insertAfter(t, "text to put after t");} + input.insertAfter(u, "text after u");} + System.out.println(tokens.toString()); + + Actually, you have to cast the 'input' to a TokenRewriteStream. :( + + You can also have multiple "instruction streams" and get multiple + rewrites from a single pass over the input. Just name the instruction + streams and use that name again when printing the buffer. This could be + useful for generating a C file and also its header file--all from the + same buffer: + + tokens.insertAfter("pass1", t, "text to put after t");} + tokens.insertAfter("pass2", u, "text after u");} + System.out.println(tokens.toString("pass1")); + System.out.println(tokens.toString("pass2")); + + If you don't use named rewrite streams, a "default" stream is used as + the first example shows. + + + What index into rewrites List are we? + + + Token buffer index. + + + + Execute the rewrite operation by possibly adding to the buffer. + Return the index of the next token to operate on. + + + + + I'm going to try replacing range from x..y with (y-x)+1 ReplaceOp + instructions. + + + + + You may have multiple, named streams of rewrite operations. + I'm calling these things "programs." + Maps String (name) -> rewrite (List) + + + + Map String (program name) -> Integer index + + + + Rollback the instruction stream for a program so that + the indicated instruction (via instructionIndex) is no + longer in the stream. UNTESTED! + + + + Reset the program so that no instructions exist + + + We need to combine operations and report invalid operations (like + overlapping replaces that are not completed nested). Inserts to + same index need to be combined etc... Here are the cases: + + I.i.u I.j.v leave alone, nonoverlapping + I.i.u I.i.v combine: Iivu + + R.i-j.u R.x-y.v | i-j in x-y delete first R + R.i-j.u R.i-j.v delete first R + R.i-j.u R.x-y.v | x-y in i-j ERROR + R.i-j.u R.x-y.v | boundaries overlap ERROR + + Delete special case of replace (text==null): + D.i-j.u D.x-y.v | boundaries overlap combine to max(min)..max(right) + + I.i.u R.x-y.v | i in (x+1)-y delete I (since insert before + we're not deleting i) + I.i.u R.x-y.v | i not in (x+1)-y leave alone, nonoverlapping + R.x-y.v I.i.u | i in x-y ERROR + R.x-y.v I.x.u R.x-y.uv (combine, delete I) + R.x-y.v I.i.u | i not in x-y leave alone, nonoverlapping + + I.i.u = insert u before op @ index i + R.x-y.u = replace x-y indexed tokens with u + + First we need to examine replaces. For any replace op: + + 1. wipe out any insertions before op within that range. + 2. Drop any replace op before that is contained completely within + that range. + 3. Throw exception upon boundary overlap with any previous replace. + + Then we can deal with inserts: + + 1. for any inserts to same index, combine even if not adjacent. + 2. for any prior replace with same left boundary, combine this + insert with replace and delete this replace. + 3. throw exception if index in same range as previous replace + + Don't actually delete; make op null in list. Easier to walk list. + Later we can throw as we add to index -> op map. + + Note that I.2 R.2-2 will wipe out I.2 even though, technically, the + inserted stuff would be before the replace range. But, if you + add tokens in front of a method body '{' and then delete the method + body, I think the stuff before the '{' you added should disappear too. + + Return a map from token index to operation. + + + Get all operations before an index of a particular kind + + + + In an action, a lexer rule can set token to this SKIP_TOKEN and ANTLR + will avoid creating a token for this symbol and try to fetch another. + + + + imaginary tree navigation type; traverse "get child" link + + + imaginary tree navigation type; finish with a child list + + + + A generic tree implementation with no payload. You must subclass to + actually have any user data. ANTLR v3 uses a list of children approach + instead of the child-sibling approach in v2. A flat tree (a list) is + an empty node whose children represent the list. An empty, but + non-null node is called "nil". + + + + + Create a new node from an existing node does nothing for BaseTree + as there are no fields other than the children list, which cannot + be copied as the children are not considered part of this node. + + + + + Get the children internal List; note that if you directly mess with + the list, do so at your own risk. + + + + BaseTree doesn't track parent pointers. + + + BaseTree doesn't track child indexes. + + + Add t as child of this node. + + + Warning: if t has no children, but child does + and child isNil then this routine moves children to t via + t.children = child.children; i.e., without copying the array. + + + + Add all elements of kids list as children of this node + + + Insert child t at child position i (0..n-1) by shifting children + i+1..n-1 to the right one position. Set parent / indexes properly + but does NOT collapse nil-rooted t's that come in here like addChild. + + + + Delete children from start to stop and replace with t even if t is + a list (nil-root tree). num of children can increase or decrease. + For huge child lists, inserting children can force walking rest of + children to set their childindex; could be slow. + + + + Override in a subclass to change the impl of children list + + + Set the parent and child index values for all child of t + + + Walk upwards looking for ancestor with this token type. + + + Walk upwards and get first ancestor with this token type. + + + + Return a list of all ancestors of this node. The first node of + list is the root and the last is the parent of this node. + + + + Print out a whole tree not just a node + + + Override to say how a node (not a tree) should look as text + + + A TreeAdaptor that works with any Tree implementation. + + + + System.identityHashCode() is not always unique; we have to + track ourselves. That's ok, it's only for debugging, though it's + expensive: we have to create a hashtable with all tree nodes in it. + + + + + Create tree node that holds the start and stop tokens associated + with an error. + + + + If you specify your own kind of tree nodes, you will likely have to + override this method. CommonTree returns Token.INVALID_TOKEN_TYPE + if no token payload but you might have to set token type for diff + node type. + + You don't have to subclass CommonErrorNode; you will likely need to + subclass your own tree node class to avoid class cast exception. + + + + + This is generic in the sense that it will work with any kind of + tree (not just ITree interface). It invokes the adaptor routines + not the tree node routines to do the construction. + + + + + Add a child to the tree t. If child is a flat tree (a list), make all + in list children of t. Warning: if t has no children, but child does + and child isNil then you can decide it is ok to move children to t via + t.children = child.children; i.e., without copying the array. Just + make sure that this is consistent with have the user will build + ASTs. + + + + + If oldRoot is a nil root, just copy or move the children to newRoot. + If not a nil root, make oldRoot a child of newRoot. + + + + old=^(nil a b c), new=r yields ^(r a b c) + old=^(a b c), new=r yields ^(r ^(a b c)) + + If newRoot is a nil-rooted single child tree, use the single + child as the new root node. + + old=^(nil a b c), new=^(nil r) yields ^(r a b c) + old=^(a b c), new=^(nil r) yields ^(r ^(a b c)) + + If oldRoot was null, it's ok, just return newRoot (even if isNil). + + old=null, new=r yields r + old=null, new=^(nil r) yields ^(nil r) + + Return newRoot. Throw an exception if newRoot is not a + simple node or nil root with a single child node--it must be a root + node. If newRoot is ^(nil x) return x as newRoot. + + Be advised that it's ok for newRoot to point at oldRoot's + children; i.e., you don't have to copy the list. We are + constructing these nodes so we should have this control for + efficiency. + + + + Transform ^(nil x) to x and nil to null + + + + Tell me how to create a token for use with imaginary token nodes. + For example, there is probably no input symbol associated with imaginary + token DECL, but you need to create it as a payload or whatever for + the DECL node as in ^(DECL type ID). + + + + If you care what the token payload objects' type is, you should + override this method and any other createToken variant. + + + + + Tell me how to create a token for use with imaginary token nodes. + For example, there is probably no input symbol associated with imaginary + token DECL, but you need to create it as a payload or whatever for + the DECL node as in ^(DECL type ID). + + + + This is a variant of createToken where the new token is derived from + an actual real input token. Typically this is for converting '{' + tokens to BLOCK etc... You'll see + + r : lc='{' ID+ '}' -> ^(BLOCK[$lc] ID+) ; + + If you care what the token payload objects' type is, you should + override this method and any other createToken variant. + + + + + Duplicate a node. This is part of the factory; + override if you want another kind of node to be built. + + + + I could use reflection to prevent having to override this + but reflection is slow. + + + + + Track start/stop token for subtree root created for a rule. + Only works with Tree nodes. For rules that match nothing, + seems like this will yield start=i and stop=i-1 in a nil node. + Might be useful info so I'll not force to be i..i. + + + + A buffered stream of tree nodes. Nodes can be from a tree of ANY kind. + + This node stream sucks all nodes out of the tree specified in + the constructor during construction and makes pointers into + the tree using an array of Object pointers. The stream necessarily + includes pointers to DOWN and UP and EOF nodes. + + This stream knows how to mark/release for backtracking. + + This stream is most suitable for tree interpreters that need to + jump around a lot or for tree parsers requiring speed (at cost of memory). + There is some duplicated functionality here with UnBufferedTreeNodeStream + but just in bookkeeping, not tree walking etc... + + TARGET DEVELOPERS: + + This is the old CommonTreeNodeStream that buffered up entire node stream. + No need to implement really as new CommonTreeNodeStream is much better + and covers what we need. + + @see CommonTreeNodeStream + + + The complete mapping from stream index to tree node. + This buffer includes pointers to DOWN, UP, and EOF nodes. + It is built upon ctor invocation. The elements are type + Object as we don't what the trees look like. + + Load upon first need of the buffer so we can set token types + of interest for reverseIndexing. Slows us down a wee bit to + do all of the if p==-1 testing everywhere though. + + + Pull nodes from which tree? + + + IF this tree (root) was created from a token stream, track it. + + + What tree adaptor was used to build these trees + + + Reuse same DOWN, UP navigation nodes unless this is true + + + The index into the nodes list of the current node (next node + to consume). If -1, nodes array not filled yet. + + + Track the last mark() call result value for use in rewind(). + + + Stack of indexes used for push/pop calls + + + Walk tree with depth-first-search and fill nodes buffer. + Don't do DOWN, UP nodes if its a list (t is isNil). + + + What is the stream index for node? 0..n-1 + Return -1 if node not found. + + + As we flatten the tree, we use UP, DOWN nodes to represent + the tree structure. When debugging we need unique nodes + so instantiate new ones when uniqueNavigationNodes is true. + + + Look backwards k nodes + + + + Make stream jump to a new location, saving old location. + Switch back with pop(). + + + + + Seek back to previous index saved during last push() call. + Return top of stack (return index). + + + + Used for testing, just return the token type stream + + + Debugging + + + A node representing erroneous token range in token stream + + + + A tree node that is wrapper for a Token object. After 3.0 release + while building tree rewrite stuff, it became clear that computing + parent and child index is very difficult and cumbersome. Better to + spend the space in every tree node. If you don't want these extra + fields, it's easy to cut them out in your own BaseTree subclass. + + + + A single token is the payload + + + + What token indexes bracket all tokens associated with this node + and below? + + + + Who is the parent node of this node; if null, implies node is root + + + What index is this node in the child list? Range: 0..n-1 + + + + For every node in this subtree, make sure it's start/stop token's + are set. Walk depth first, visit bottom up. Only updates nodes + with at least one token index < 0. + + + + + A TreeAdaptor that works with any Tree implementation. It provides + really just factory methods; all the work is done by BaseTreeAdaptor. + If you would like to have different tokens created than ClassicToken + objects, you need to override this and then set the parser tree adaptor to + use your subclass. + + + + To get your parser to build nodes of a different type, override + create(Token), errorNode(), and to be safe, YourTreeClass.dupNode(). + dupNode is called to duplicate nodes during rewrite operations. + + + + + Tell me how to create a token for use with imaginary token nodes. + For example, there is probably no input symbol associated with imaginary + token DECL, but you need to create it as a payload or whatever for + the DECL node as in ^(DECL type ID). + + + + If you care what the token payload objects' type is, you should + override this method and any other createToken variant. + + + + + Tell me how to create a token for use with imaginary token nodes. + For example, there is probably no input symbol associated with imaginary + token DECL, but you need to create it as a payload or whatever for + the DECL node as in ^(DECL type ID). + + + + This is a variant of createToken where the new token is derived from + an actual real input token. Typically this is for converting '{' + tokens to BLOCK etc... You'll see + + r : lc='{' ID+ '}' -> ^(BLOCK[$lc] ID+) ; + + If you care what the token payload objects' type is, you should + override this method and any other createToken variant. + + + + + What is the Token associated with this node? If + you are not using CommonTree, then you must + override this in your own adaptor. + + + + Pull nodes from which tree? + + + If this tree (root) was created from a token stream, track it. + + + What tree adaptor was used to build these trees + + + The tree iterator we are using + + + Stack of indexes used for push/pop calls + + + Tree (nil A B C) trees like flat A B C streams + + + Tracks tree depth. Level=0 means we're at root node level. + + + Tracks the last node before the start of {@link #data} which contains + position information to provide information for error reporting. This is + tracked in addition to {@link #prevElement} which may or may not contain + position information. + + @see #hasPositionInformation + @see RecognitionException#extractInformationFromTreeNodeStream + + + Make stream jump to a new location, saving old location. + Switch back with pop(). + + + Seek back to previous index saved during last push() call. + Return top of stack (return index). + + + Returns an element containing position information. If {@code allowApproximateLocation} is {@code false}, then + this method will return the {@code LT(1)} element if it contains position information, and otherwise return {@code null}. + If {@code allowApproximateLocation} is {@code true}, then this method will return the last known element containing position information. + + @see #hasPositionInformation + + + For debugging; destructive: moves tree iterator to end. + + + A utility class to generate DOT diagrams (graphviz) from + arbitrary trees. You can pass in your own templates and + can pass in any kind of tree or use Tree interface method. + I wanted this separator so that you don't have to include + ST just to use the org.antlr.runtime.tree.* package. + This is a set of non-static methods so you can subclass + to override. For example, here is an invocation: + + CharStream input = new ANTLRInputStream(System.in); + TLexer lex = new TLexer(input); + CommonTokenStream tokens = new CommonTokenStream(lex); + TParser parser = new TParser(tokens); + TParser.e_return r = parser.e(); + Tree t = (Tree)r.tree; + System.out.println(t.toStringTree()); + DOTTreeGenerator gen = new DOTTreeGenerator(); + StringTemplate st = gen.toDOT(t); + System.out.println(st); + + + Track node to number mapping so we can get proper node name back + + + Track node number so we can get unique node names + + + Generate DOT (graphviz) for a whole tree not just a node. + For example, 3+4*5 should generate: + + digraph { + node [shape=plaintext, fixedsize=true, fontsize=11, fontname="Courier", + width=.4, height=.2]; + edge [arrowsize=.7] + "+"->3 + "+"->"*" + "*"->4 + "*"->5 + } + + Takes a Tree interface object. + + + + @author Sam Harwell + + + Returns an element containing concrete information about the current + position in the stream. + + @param allowApproximateLocation if {@code false}, this method returns + {@code null} if an element containing exact information about the current + position is not available + + + Determines if the specified {@code element} contains concrete position + information. + + @param element the element to check + @return {@code true} if {@code element} contains concrete position + information, otherwise {@code false} + + + + What does a tree look like? ANTLR has a number of support classes + such as CommonTreeNodeStream that work on these kinds of trees. You + don't have to make your trees implement this interface, but if you do, + you'll be able to use more support code. + + + + NOTE: When constructing trees, ANTLR can build any kind of tree; it can + even use Token objects as trees if you add a child list to your tokens. + + This is a tree node without any payload; just navigation and factory stuff. + + + + Is there is a node above with token type ttype? + + + Walk upwards and get first ancestor with this token type. + + + + Return a list of all ancestors of this node. The first node of + list is the root and the last is the parent of this node. + + + + This node is what child index? 0..n-1 + + + Set the parent and child index values for all children + + + + Add t as a child to this node. If t is null, do nothing. If t + is nil, add all children of t to this' children. + + + + Set ith child (0..n-1) to t; t must be non-null and non-nil node + + + + Delete children from start to stop and replace with t even if t is + a list (nil-root tree). num of children can increase or decrease. + For huge child lists, inserting children can force walking rest of + children to set their childindex; could be slow. + + + + + Indicates the node is a nil node but may still have children, meaning + the tree is a flat list. + + + + + What is the smallest token index (indexing from 0) for this node + and its children? + + + + + What is the largest token index (indexing from 0) for this node + and its children? + + + + Return a token type; needed for tree parsing + + + In case we don't have a token payload, what is the line for errors? + + + + How to create and navigate trees. Rather than have a separate factory + and adaptor, I've merged them. Makes sense to encapsulate. + + + + This takes the place of the tree construction code generated in the + generated code in 2.x and the ASTFactory. + + I do not need to know the type of a tree at all so they are all + generic Objects. This may increase the amount of typecasting needed. :( + + + + + Create a tree node from Token object; for CommonTree type trees, + then the token just becomes the payload. This is the most + common create call. + + + + Override if you want another kind of node to be built. + + + + + Create a new node derived from a token, with a new token type. + This is invoked from an imaginary node ref on right side of a + rewrite rule as IMAG[$tokenLabel]. + + + + This should invoke createToken(Token). + + + + + Same as create(tokenType,fromToken) except set the text too. + This is invoked from an imaginary node ref on right side of a + rewrite rule as IMAG[$tokenLabel, "IMAG"]. + + + + This should invoke createToken(Token). + + + + + Same as create(fromToken) except set the text too. + This is invoked when the text terminal option is set, as in + IMAG<text='IMAG'>. + + + + This should invoke createToken(Token). + + + + + Create a new node derived from a token, with a new token type. + This is invoked from an imaginary node ref on right side of a + rewrite rule as IMAG["IMAG"]. + + + + This should invoke createToken(int,String). + + + + Duplicate a single tree node. + Override if you want another kind of node to be built. + + + Duplicate tree recursively, using dupNode() for each node + + + + Return a nil node (an empty but non-null node) that can hold + a list of element as the children. If you want a flat tree (a list) + use "t=adaptor.nil(); t.addChild(x); t.addChild(y);" + + + + + Return a tree node representing an error. This node records the + tokens consumed during error recovery. The start token indicates the + input symbol at which the error was detected. The stop token indicates + the last symbol consumed during recovery. + + + + You must specify the input stream so that the erroneous text can + be packaged up in the error node. The exception could be useful + to some applications; default implementation stores ptr to it in + the CommonErrorNode. + + This only makes sense during token parsing, not tree parsing. + Tree parsing should happen only when parsing and tree construction + succeed. + + + + Is tree considered a nil node used to make lists of child nodes? + + + + Add a child to the tree t. If child is a flat tree (a list), make all + in list children of t. Warning: if t has no children, but child does + and child isNil then you can decide it is ok to move children to t via + t.children = child.children; i.e., without copying the array. Just + make sure that this is consistent with have the user will build + ASTs. Do nothing if t or child is null. + + + + + If oldRoot is a nil root, just copy or move the children to newRoot. + If not a nil root, make oldRoot a child of newRoot. + + + + old=^(nil a b c), new=r yields ^(r a b c) + old=^(a b c), new=r yields ^(r ^(a b c)) + + If newRoot is a nil-rooted single child tree, use the single + child as the new root node. + + old=^(nil a b c), new=^(nil r) yields ^(r a b c) + old=^(a b c), new=^(nil r) yields ^(r ^(a b c)) + + If oldRoot was null, it's ok, just return newRoot (even if isNil). + + old=null, new=r yields r + old=null, new=^(nil r) yields ^(nil r) + + Return newRoot. Throw an exception if newRoot is not a + simple node or nil root with a single child node--it must be a root + node. If newRoot is ^(nil x) return x as newRoot. + + Be advised that it's ok for newRoot to point at oldRoot's + children; i.e., you don't have to copy the list. We are + constructing these nodes so we should have this control for + efficiency. + + + + + Given the root of the subtree created for this rule, post process + it to do any simplifications or whatever you want. A required + behavior is to convert ^(nil singleSubtree) to singleSubtree + as the setting of start/stop indexes relies on a single non-nil root + for non-flat trees. + + + + Flat trees such as for lists like "idlist : ID+ ;" are left alone + unless there is only one ID. For a list, the start/stop indexes + are set in the nil node. + + This method is executed after all rule tree construction and right + before setTokenBoundaries(). + + + + For identifying trees. + + + How to identify nodes so we can say "add node to a prior node"? + Even becomeRoot is an issue. Use System.identityHashCode(node) + usually. + + + + + Create a node for newRoot make it the root of oldRoot. + If oldRoot is a nil root, just copy or move the children to newRoot. + If not a nil root, make oldRoot a child of newRoot. + + + + Return node created for newRoot. + + + + Be advised: when debugging ASTs, the DebugTreeAdaptor manually + calls create(Token child) and then plain becomeRoot(node, node) + because it needs to trap calls to create, but it can't since it delegates + to not inherits from the TreeAdaptor. + + + + For tree parsing, I need to know the token type of a node + + + Node constructors can set the type of a node + + + Node constructors can set the text of a node + + + + Return the token object from which this node was created. + Currently used only for printing an error message. + The error display routine in BaseRecognizer needs to + display where the input the error occurred. If your + tree of limitation does not store information that can + lead you to the token, you can create a token filled with + the appropriate information and pass that back. See + BaseRecognizer.getErrorMessage(). + + + + + Where are the bounds in the input token stream for this node and + all children? Each rule that creates AST nodes will call this + method right before returning. Flat trees (i.e., lists) will + still usually have a nil root node just to hold the children list. + That node would contain the start/stop indexes then. + + + + Get the token start index for this subtree; return -1 if no such index + + + Get the token stop index for this subtree; return -1 if no such index + + + Get a child 0..n-1 node + + + Set ith child (0..n-1) to t; t must be non-null and non-nil node + + + Remove ith child and shift children down from right. + + + How many children? If 0, then this is a leaf node + + + + Who is the parent node of this node; if null, implies node is root. + If your node type doesn't handle this, it's ok but the tree rewrites + in tree parsers need this functionality. + + + + + What index is this node in the child list? Range: 0..n-1 + If your node type doesn't handle this, it's ok but the tree rewrites + in tree parsers need this functionality. + + + + + Replace from start to stop child index of parent with t, which might + be a list. Number of children may be different after this call. + + + + If parent is null, don't do anything; must be at root of overall tree. + Can't replace whatever points to the parent externally. Do nothing. + + + + A stream of tree nodes, accessing nodes from a tree of some kind + + + + Get a tree node at an absolute index i; 0..n-1. + If you don't want to buffer up nodes, then this method makes no + sense for you. + + + + + Get tree node at current input pointer + ahead where + ==1 is next node. <0 indicates nodes in the past. So + {@code LT(-1)} is previous node, but implementations are not required to + provide results for < -1. {@code LT(0)} is undefined. For + <=n, return . Return for {@code LT(0)} + and any index that results in an absolute address that is negative. + + + + This is analogous to , but this returns a tree node + instead of a . Makes code generation identical for both + parser and tree grammars. + + + + + Where is this stream pulling nodes from? This is not the name, but + the object that provides node objects. + + + + + If the tree associated with this stream was created from a + {@link TokenStream}, you can specify it here. Used to do rule + {@code $text} attribute in tree parser. Optional unless you use tree + parser rule {@code $text} attribute or {@code output=template} and + {@code rewrite=true} options. + + + + + What adaptor can tell me how to interpret/navigate nodes and + trees. E.g., get text of a node. + + + + + As we flatten the tree, we use {@link Token#UP}, {@link Token#DOWN} nodes + to represent the tree structure. When debugging we need unique nodes so + we have to instantiate new ones. When doing normal tree parsing, it's + slow and a waste of memory to create unique navigation nodes. Default + should be {@code false}. + + + + + Return the text of all nodes from {@code start} to {@code stop}, + inclusive. If the stream does not buffer all the nodes then it can still + walk recursively from start until stop. You can always return + {@code null} or {@code ""} too, but users should not access + {@code $ruleLabel.text} in an action of course in that case. + + + + + Replace children of {@code parent} from index {@code startChildIndex} to + {@code stopChildIndex} with {@code t}, which might be a list. Number of + children may be different after this call. The stream is notified because + it is walking the tree and might need to know you are monkeying with the + underlying tree. Also, it might be able to modify the node stream to + avoid restreaming for future phases. + + + + If {@code parent} is {@code null}, don't do anything; must be at root of + overall tree. Can't replace whatever points to the parent externally. Do + nothing. + + + + + How to execute code for node t when a visitor visits node t. Execute + pre() before visiting children and execute post() after visiting children. + + + + + Execute an action before visiting children of t. Return t or + a rewritten t. It is up to the visitor to decide what to do + with the return value. Children of returned value will be + visited if using TreeVisitor.visit(). + + + + + Execute an action after visiting children of t. Return t or + a rewritten t. It is up to the visitor to decide what to do + with the return value. + + + + + A record of the rules used to match a token sequence. The tokens + end up as the leaves of this tree and rule nodes are the interior nodes. + This really adds no functionality, it is just an alias for CommonTree + that is more meaningful (specific) and holds a String to display for a node. + + + + + Emit a token and all hidden nodes before. EOF node holds all + hidden tokens after last real token. + + + + + Print out the leaves of this tree, which means printing original + input back out. + + + + + Base class for all exceptions thrown during AST rewrite construction. + This signifies a case where the cardinality of two or more elements + in a subrule are different: (ID INT)+ where |ID|!=|INT| + + + + No elements within a (...)+ in a rewrite rule + + + Ref to ID or expr but no tokens in ID stream or subtrees in expr stream + + + + A generic list of elements tracked in an alternative to be used in + a -> rewrite rule. We need to subclass to fill in the next() method, + which returns either an AST node wrapped around a token payload or + an existing subtree. + + + + Once you start next()ing, do not try to add more elements. It will + break the cursor tracking I believe. + + TODO: add mechanism to detect/puke on modification after reading from stream + + + + + + + + Cursor 0..n-1. If singleElement!=null, cursor is 0 until you next(), + which bumps it to 1 meaning no more elements. + + + + Track single elements w/o creating a list. Upon 2nd add, alloc list + + + The list of tokens or subtrees we are tracking + + + Once a node / subtree has been used in a stream, it must be dup'd + from then on. Streams are reset after subrules so that the streams + can be reused in future subrules. So, reset must set a dirty bit. + If dirty, then next() always returns a dup. + + + The element or stream description; usually has name of the token or + rule reference that this list tracks. Can include rulename too, but + the exception would track that info. + + + Create a stream with one element + + + Create a stream, but feed off an existing list + + + + Reset the condition of this stream so that it appears we have + not consumed any of its elements. Elements themselves are untouched. + Once we reset the stream, any future use will need duplicates. Set + the dirty bit. + + + + + Return the next element in the stream. If out of elements, throw + an exception unless size()==1. If size is 1, then return elements[0]. + Return a duplicate node/subtree if stream is out of elements and + size==1. If we've already used the element, dup (dirty bit set). + + + + + Do the work of getting the next element, making sure that it's + a tree node or subtree. Deal with the optimization of single- + element list versus list of size > 1. Throw an exception + if the stream is empty or we're out of elements and size>1. + protected so you can override in a subclass if necessary. + + + + + When constructing trees, sometimes we need to dup a token or AST + subtree. Dup'ing a token means just creating another AST node + around it. For trees, you must call the adaptor.dupTree() unless + the element is for a tree root; then it must be a node dup. + + + + + Ensure stream emits trees; tokens must be converted to AST nodes. + AST nodes can be passed through unmolested. + + + + + Queues up nodes matched on left side of -> in a tree parser. This is + the analog of RewriteRuleTokenStream for normal parsers. + + + + Create a stream with one element + + + Create a stream, but feed off an existing list + + + Create a stream with one element + + + Create a stream, but feed off an existing list + + + + Treat next element as a single node even if it's a subtree. + This is used instead of next() when the result has to be a + tree root node. Also prevents us from duplicating recently-added + children; e.g., ^(type ID)+ adds ID to type and then 2nd iteration + must dup the type node, but ID has been added. + + + + Referencing a rule result twice is ok; dup entire tree as + we can't be adding trees as root; e.g., expr expr. + + Hideous code duplication here with super.next(). Can't think of + a proper way to refactor. This needs to always call dup node + and super.next() doesn't know which to call: dup node or dup tree. + + + + Create a stream with one element + + + Create a stream, but feed off an existing list + + + Get next token from stream and make a node for it + + + + Don't convert to a tree unless they explicitly call nextTree. + This way we can do hetero tree nodes in rewrite. + + + + Return a node stream from a doubly-linked tree whose nodes + know what child index they are. No remove() is supported. + + Emit navigation nodes (DOWN, UP, and EOF) to let show tree structure. + + + If we emit UP/DOWN nodes, we need to spit out multiple nodes per + next() call. + + + + A parser for a stream of tree nodes. "tree grammars" result in a subclass + of this. All the error reporting and recovery is shared with Parser via + the BaseRecognizer superclass. + + + + Set the input stream + + + + Match '.' in tree parser has special meaning. Skip node or + entire tree if node has children. If children, scan until + corresponding UP node. + + + + + We have DOWN/UP nodes in the stream that have no line info; override. + plus we want to alter the exception type. Don't try to recover + from tree parser errors inline... + + + + + Prefix error message with the grammar name because message is + always intended for the programmer because the parser built + the input tree not the user. + + + + + Tree parsers parse nodes they usually have a token object as + payload. Set the exception token and do the default behavior. + + + + The tree pattern to lex like "(A B C)" + + + Index into input string + + + Current char + + + How long is the pattern in char? + + + Set when token type is ID or ARG (name mimics Java's StreamTokenizer) + + + Override this if you need transformation tracing to go somewhere + other than stdout or if you're not using ITree-derived trees. + + + + This is identical to the ParserRuleReturnScope except that + the start property is a tree nodes not Token object + when you are parsing trees. + + + + Gets the first node or root node of tree matched for this rule. + + + Do a depth first walk of a tree, applying pre() and post() actions as we go. + + + + Visit every node in tree t and trigger an action for each node + before/after having visited all of its children. Bottom up walk. + Execute both actions even if t has no children. Ignore return + results from transforming children since they will have altered + the child list of this node (their parent). Return result of + applying post action to this node. + + + + + Build and navigate trees with this object. Must know about the names + of tokens so you have to pass in a map or array of token names (from which + this class can build the map). I.e., Token DECL means nothing unless the + class can translate it to a token type. + + + + In order to create nodes and navigate, this class needs a TreeAdaptor. + + This class can build a token type -> node index for repeated use or for + iterating over the various nodes with a particular type. + + This class works in conjunction with the TreeAdaptor rather than moving + all this functionality into the adaptor. An adaptor helps build and + navigate trees using methods. This class helps you do it with string + patterns like "(A B C)". You can create a tree from that pattern or + match subtrees against it. + + + + + When using %label:TOKENNAME in a tree for parse(), we must + track the label. + + + + This adaptor creates TreePattern objects for use during scan() + + + + Compute a Map<String, Integer> that is an inverted index of + tokenNames (which maps int token types to names). + + + + Using the map of token names to token types, return the type. + + + + Walk the entire tree and make a node name to nodes mapping. + For now, use recursion but later nonrecursive version may be + more efficient. Returns Map<Integer, List> where the List is + of your AST node type. The Integer is the token type of the node. + + + + TODO: save this index so that find and visit are faster + + + + Do the work for index + + + Return a List of tree nodes with token type ttype + + + Return a List of subtrees matching pattern. + + + + Visit every ttype node in t, invoking the visitor. This is a quicker + version of the general visit(t, pattern) method. The labels arg + of the visitor action method is never set (it's null) since using + a token type rather than a pattern doesn't let us set a label. + + + + Do the recursive work for visit + + + + For all subtrees that match the pattern, execute the visit action. + The implementation uses the root node of the pattern in combination + with visit(t, ttype, visitor) so nil-rooted patterns are not allowed. + Patterns with wildcard roots are also not allowed. + + + + + Given a pattern like (ASSIGN %lhs:ID %rhs:.) with optional labels + on the various nodes and '.' (dot) as the node/subtree wildcard, + return true if the pattern matches and fill the labels Map with + the labels pointing at the appropriate nodes. Return false if + the pattern is malformed or the tree does not match. + + + + If a node specifies a text arg in pattern, then that must match + for that node in t. + + TODO: what's a better way to indicate bad pattern? Exceptions are a hassle + + + + + Do the work for parse. Check to see if the t2 pattern fits the + structure and token types in t1. Check text if the pattern has + text arguments on nodes. Fill labels map with pointers to nodes + in tree matched against nodes in pattern with labels. + + + + + Create a tree or node from the indicated tree pattern that closely + follows ANTLR tree grammar tree element syntax: + + (root child1 ... child2). + + + + You can also just pass in a node: ID + + Any node can have a text argument: ID[foo] + (notice there are no quotes around foo--it's clear it's a string). + + nil is a special name meaning "give me a nil node". Useful for + making lists: (nil A B C) is a list of A B C. + + + + + Compare t1 and t2; return true if token types/text, structure match exactly. + The trees are examined in their entirety so that (A B) does not match + (A B C) nor (A (B C)). + + + + TODO: allow them to pass in a comparator + TODO: have a version that is nonstatic so it can use instance adaptor + + I cannot rely on the tree node's equals() implementation as I make + no constraints at all on the node types nor interface etc... + + + + + Compare type, structure, and text of two trees, assuming adaptor in + this instance of a TreeWizard. + + + + A token stream that pulls tokens from the code source on-demand and + without tracking a complete buffer of the tokens. This stream buffers + the minimum number of tokens possible. It's the same as + OnDemandTokenStream except that OnDemandTokenStream buffers all tokens. + + You can't use this stream if you pass whitespace or other off-channel + tokens to the parser. The stream can't ignore off-channel tokens. + + You can only look backwards 1 token: LT(-1). + + Use this when you need to read from a socket or other infinite stream. + + @see BufferedTokenStream + @see CommonTokenStream + + + Skip tokens on any channel but this one; this is how we skip whitespace... + + + An extra token while parsing a TokenStream + + + diff --git a/nhibernateg7/packages/Antlr3.Runtime.3.5.1/lib/net40-client/Antlr3.Runtime.dll b/nhibernateg7/packages/Antlr3.Runtime.3.5.1/lib/net40-client/Antlr3.Runtime.dll new file mode 100644 index 0000000..55c8fbd Binary files /dev/null and b/nhibernateg7/packages/Antlr3.Runtime.3.5.1/lib/net40-client/Antlr3.Runtime.dll differ diff --git a/nhibernateg7/packages/Antlr3.Runtime.3.5.1/lib/net40-client/Antlr3.Runtime.xml b/nhibernateg7/packages/Antlr3.Runtime.3.5.1/lib/net40-client/Antlr3.Runtime.xml new file mode 100644 index 0000000..565e15d --- /dev/null +++ b/nhibernateg7/packages/Antlr3.Runtime.3.5.1/lib/net40-client/Antlr3.Runtime.xml @@ -0,0 +1,3249 @@ + + + + Antlr3.Runtime + + + + + This is a char buffer stream that is loaded from a file + all at once when you construct the object. This looks very + much like an ANTLReader or ANTLRInputStream, but it's a special case + since we know the exact size of the object to load. We can avoid lots + of data copying. + + + + + A kind of ReaderStream that pulls from an InputStream. + Useful for reading from stdin and specifying file encodings etc... + + + + + Vacuum all input from a Reader and then treat it like a StringStream. + Manage the buffer manually to avoid unnecessary data copying. + + + + If you need encoding, use ANTLRInputStream. + + + + + A pretty quick CharStream that pulls all data from an array + directly. Every method call counts in the lexer. Java's + strings aren't very good so I'm avoiding. + + + + The data being scanned + + + How many characters are actually in the buffer + + + 0..n-1 index into string of next char + + + line number 1..n within the input + + + The index of the character relative to the beginning of the line 0..n-1 + + + tracks how deep mark() calls are nested + + + + A list of CharStreamState objects that tracks the stream state + values line, charPositionInLine, and p that can change as you + move through the input stream. Indexed from 1..markDepth. + A null is kept @ index 0. Create upon first call to mark(). + + + + Track the last mark() call result value for use in rewind(). + + + What is name or source of this char stream? + + + Copy data in string to a local char array + + + This is the preferred constructor as no data is copied + + + + Return the current input symbol index 0..n where n indicates the + last symbol has been read. The index is the index of char to + be returned from LA(1). + + + + + Reset the stream so that it's in the same state it was + when the object was created *except* the data array is not + touched. + + + + + consume() ahead until p==index; can't just set p=index as we must + update line and charPositionInLine. + + + + + A generic recognizer that can handle recognizers generated from + lexer, parser, and tree grammars. This is all the parsing + support code essentially; most of it is error recovery stuff and + backtracking. + + + + + State of a lexer, parser, or tree parser are collected into a state + object so the state can be shared. This sharing is needed to + have one grammar import others and share same error variables + and other state variables. It's a kind of explicit multiple + inheritance via delegation of methods and shared state. + + + + reset the parser's state; subclasses must rewinds the input stream + + + + Match current input symbol against ttype. Attempt + single token insertion or deletion error recovery. If + that fails, throw MismatchedTokenException. + + + + To turn off single token insertion or deletion error + recovery, override recoverFromMismatchedToken() and have it + throw an exception. See TreeParser.recoverFromMismatchedToken(). + This way any error in a rule will cause an exception and + immediate exit from rule. Rule would recover by resynchronizing + to the set of symbols that can follow rule ref. + + + + Match the wildcard: in a symbol + + + Report a recognition problem. + + + This method sets errorRecovery to indicate the parser is recovering + not parsing. Once in recovery mode, no errors are generated. + To get out of recovery mode, the parser must successfully match + a token (after a resync). So it will go: + + 1. error occurs + 2. enter recovery mode, report error + 3. consume until token found in resynch set + 4. try to resume parsing + 5. next match() will reset errorRecovery mode + + If you override, make sure to update syntaxErrors if you care about that. + + + + What error message should be generated for the various exception types? + + + Not very object-oriented code, but I like having all error message + generation within one method rather than spread among all of the + exception classes. This also makes it much easier for the exception + handling because the exception classes do not have to have pointers back + to this object to access utility routines and so on. Also, changing + the message for an exception type would be difficult because you + would have to subclassing exception, but then somehow get ANTLR + to make those kinds of exception objects instead of the default. + This looks weird, but trust me--it makes the most sense in terms + of flexibility. + + For grammar debugging, you will want to override this to add + more information such as the stack frame with + getRuleInvocationStack(e, this.getClass().getName()) and, + for no viable alts, the decision description and state etc... + + Override this to change the message generated for one or more + exception types. + + + + + Get number of recognition errors (lexer, parser, tree parser). Each + recognizer tracks its own number. So parser and lexer each have + separate count. Does not count the spurious errors found between + an error and next valid token match + + + + + + What is the error header, normally line/character position information? + + + + How should a token be displayed in an error message? The default + is to display just the text, but during development you might + want to have a lot of information spit out. Override in that case + to use t.ToString() (which, for CommonToken, dumps everything about + the token). This is better than forcing you to override a method in + your token objects because you don't have to go modify your lexer + so that it creates a new Java type. + + + + Override this method to change where error messages go + + + + Recover from an error found on the input stream. This is + for NoViableAlt and mismatched symbol exceptions. If you enable + single token insertion and deletion, this will usually not + handle mismatched symbol exceptions but there could be a mismatched + token that the match() routine could not recover from. + + + + + A hook to listen in on the token consumption during error recovery. + The DebugParser subclasses this to fire events to the listenter. + + + + + Compute the context-sensitive FOLLOW set for current rule. + This is set of token types that can follow a specific rule + reference given a specific call chain. You get the set of + viable tokens that can possibly come next (lookahead depth 1) + given the current call chain. Contrast this with the + definition of plain FOLLOW for rule r: + + + FOLLOW(r)={x | S=>*alpha r beta in G and x in FIRST(beta)} + + where x in T* and alpha, beta in V*; T is set of terminals and + V is the set of terminals and nonterminals. In other words, + FOLLOW(r) is the set of all tokens that can possibly follow + references to r in *any* sentential form (context). At + runtime, however, we know precisely which context applies as + we have the call chain. We may compute the exact (rather + than covering superset) set of following tokens. + + For example, consider grammar: + + stat : ID '=' expr ';' // FOLLOW(stat)=={EOF} + | "return" expr '.' + ; + expr : atom ('+' atom)* ; // FOLLOW(expr)=={';','.',')'} + atom : INT // FOLLOW(atom)=={'+',')',';','.'} + | '(' expr ')' + ; + + The FOLLOW sets are all inclusive whereas context-sensitive + FOLLOW sets are precisely what could follow a rule reference. + For input input "i=(3);", here is the derivation: + + stat => ID '=' expr ';' + => ID '=' atom ('+' atom)* ';' + => ID '=' '(' expr ')' ('+' atom)* ';' + => ID '=' '(' atom ')' ('+' atom)* ';' + => ID '=' '(' INT ')' ('+' atom)* ';' + => ID '=' '(' INT ')' ';' + + At the "3" token, you'd have a call chain of + + stat -> expr -> atom -> expr -> atom + + What can follow that specific nested ref to atom? Exactly ')' + as you can see by looking at the derivation of this specific + input. Contrast this with the FOLLOW(atom)={'+',')',';','.'}. + + You want the exact viable token set when recovering from a + token mismatch. Upon token mismatch, if LA(1) is member of + the viable next token set, then you know there is most likely + a missing token in the input stream. "Insert" one by just not + throwing an exception. + + + Attempt to recover from a single missing or extra token. + + EXTRA TOKEN + + LA(1) is not what we are looking for. If LA(2) has the right token, + however, then assume LA(1) is some extra spurious token. Delete it + and LA(2) as if we were doing a normal match(), which advances the + input. + + MISSING TOKEN + + If current token is consistent with what could come after + ttype then it is ok to "insert" the missing token, else throw + exception For example, Input "i=(3;" is clearly missing the + ')'. When the parser returns from the nested call to expr, it + will have call chain: + + stat -> expr -> atom + + and it will be trying to match the ')' at this point in the + derivation: + + => ID '=' '(' INT ')' ('+' atom)* ';' + ^ + match() will see that ';' doesn't match ')' and report a + mismatched token error. To recover, it sees that LA(1)==';' + is in the set of tokens that can follow the ')' token + reference in rule atom. It can assume that you forgot the ')'. + + + Not currently used + + + + Match needs to return the current input symbol, which gets put + into the label for the associated token ref; e.g., x=ID. Token + and tree parsers need to return different objects. Rather than test + for input stream type or change the IntStream interface, I use + a simple method to ask the recognizer to tell me what the current + input symbol is. + + + This is ignored for lexers. + + + Conjure up a missing token during error recovery. + + + The recognizer attempts to recover from single missing + symbols. But, actions might refer to that missing symbol. + For example, x=ID {f($x);}. The action clearly assumes + that there has been an identifier matched previously and that + $x points at that token. If that token is missing, but + the next token in the stream is what we want we assume that + this token is missing and we keep going. Because we + have to return some token to replace the missing token, + we have to conjure one up. This method gives the user control + over the tokens returned for missing tokens. Mostly, + you will want to create something special for identifier + tokens. For literals such as '{' and ',', the default + action in the parser or tree parser works. It simply creates + a CommonToken of the appropriate type. The text will be the token. + If you change what tokens must be created by the lexer, + override this method to create the appropriate tokens. + + + + Consume tokens until one matches the given token set + + + Push a rule's follow set using our own hardcoded stack + + + + Return of the rules in your parser instance + leading up to a call to this method. You could override if + you want more details such as the file/line info of where + in the parser java code a rule is invoked. + + + + This is very useful for error messages and for context-sensitive + error recovery. + + + + + A more general version of GetRuleInvocationStack where you can + pass in the StackTrace of, for example, a RecognitionException + to get it's rule stack trace. + + + + Return whether or not a backtracking attempt failed. + + + + Used to print out token names like ID during debugging and + error reporting. The generated parsers implement a method + that overrides this to point to their String[] tokenNames. + + + + + For debugging and other purposes, might want the grammar name. + Have ANTLR generate an implementation for this method. + + + + + A convenience method for use most often with template rewrites. + Convert a list of to a list of . + + + + + Given a rule number and a start token index number, return + MEMO_RULE_UNKNOWN if the rule has not parsed input starting from + start index. If this rule has parsed input starting from the + start index before, then return where the rule stopped parsing. + It returns the index of the last token matched by the rule. + + + + For now we use a hashtable and just the slow Object-based one. + Later, we can make a special one for ints and also one that + tosses out data after we commit past input position i. + + + + + Has this rule already parsed input at the current index in the + input stream? Return the stop token index or MEMO_RULE_UNKNOWN. + If we attempted but failed to parse properly before, return + MEMO_RULE_FAILED. + + + + This method has a side-effect: if we have seen this input for + this rule and successfully parsed before, then seek ahead to + 1 past the stop token matched for this rule last time. + + + + + Record whether or not this rule parsed the input at this position + successfully. Use a standard java hashtable for now. + + + + return how many rule/input-index pairs there are in total. + TODO: this includes synpreds. :( + + + + A stripped-down version of org.antlr.misc.BitSet that is just + good enough to handle runtime requirements such as FOLLOW sets + for automatic error recovery. + + + + + We will often need to do a mod operator (i mod nbits). Its + turns out that, for powers of two, this mod operation is + same as (i & (nbits-1)). Since mod is slow, we use a + precomputed mod mask to do the mod instead. + + + + The actual data bits + + + Construct a bitset of size one word (64 bits) + + + Construction from a static array of longs + + + Construction from a list of integers + + + Construct a bitset given the size + The size of the bitset in bits + + + return this | a in a new set + + + or this element into this set (grow as necessary to accommodate) + + + Grows the set to a larger number of bits. + element that must fit in set + + + Sets the size of a set. + how many words the new set should be + + + return how much space is being used by the bits array not how many actually have member bits on. + + + Is this contained within a? + + + Buffer all input tokens but do on-demand fetching of new tokens from + lexer. Useful when the parser or lexer has to set context/mode info before + proper lexing of future tokens. The ST template parser needs this, + for example, because it has to constantly flip back and forth between + inside/output templates. E.g., <names:{hi, <it>}> has to parse names + as part of an expression but "hi, <it>" as a nested template. + + You can't use this stream if you pass whitespace or other off-channel + tokens to the parser. The stream can't ignore off-channel tokens. + (UnbufferedTokenStream is the same way.) + + This is not a subclass of UnbufferedTokenStream because I don't want + to confuse small moving window of tokens it uses for the full buffer. + + + Record every single token pulled from the source so we can reproduce + chunks of it later. The buffer in LookaheadStream overlaps sometimes + as its moving window moves through the input. This list captures + everything so we can access complete input text. + + + Track the last mark() call result value for use in rewind(). + + + The index into the tokens list of the current token (next token + to consume). tokens[p] should be LT(1). p=-1 indicates need + to initialize with first token. The ctor doesn't get a token. + First call to LT(1) or whatever gets the first token and sets p=0; + + + + How deep have we gone? + + + + Move the input pointer to the next incoming token. The stream + must become active with LT(1) available. consume() simply + moves the input pointer so that LT(1) points at the next + input symbol. Consume at least one token. + + Walk past any token not on the channel the parser is listening to. + + + Make sure index i in tokens has a token. + + + add n elements to buffer + + + Given a start and stop index, return a List of all tokens in + the token type BitSet. Return null if no tokens were found. This + method looks at both on and off channel tokens. + + + + When walking ahead with cyclic DFA or for syntactic predicates, + we need to record the state of the input stream (char index, + line, etc...) so that we can rewind the state after scanning ahead. + + + This is the complete state of a stream. + + + Index into the char stream of next lookahead char + + + What line number is the scanner at before processing buffer[p]? + + + What char position 0..n-1 in line is scanner before processing buffer[p]? + + + + A Token object like we'd use in ANTLR 2.x; has an actual string created + and associated with this object. These objects are needed for imaginary + tree nodes that have payload objects. We need to create a Token object + that has a string; the tree node will point at this token. CommonToken + has indexes into a char stream and hence cannot be used to introduce + new strings. + + + + What token number is this from 0..n-1 tokens + + + + We need to be able to change the text once in a while. If + this is non-null, then getText should return this. Note that + start/stop are not affected by changing this. + + + + What token number is this from 0..n-1 tokens; < 0 implies invalid index + + + The char position into the input buffer where this token starts + + + The char position into the input buffer where this token stops + + + + The most common stream of tokens is one where every token is buffered up + and tokens are prefiltered for a certain channel (the parser will only + see these tokens and cannot change the filter channel number during the + parse). + + + TODO: how to access the full token stream? How to track all tokens matched per rule? + + + Skip tokens on any channel but this one; this is how we skip whitespace... + + + Reset this token stream by setting its token source. + + + Always leave p on an on-channel token. + + + Given a starting index, return the index of the first on-channel + token. + + + All debugging events that a recognizer can trigger. + + + I did not create a separate AST debugging interface as it would create + lots of extra classes and DebugParser has a dbg var defined, which makes + it hard to change to ASTDebugEventListener. I looked hard at this issue + and it is easier to understand as one monolithic event interface for all + possible events. Hopefully, adding ST debugging stuff won't be bad. Leave + for future. 4/26/2006. + + + + + The parser has just entered a rule. No decision has been made about + which alt is predicted. This is fired AFTER init actions have been + executed. Attributes are defined and available etc... + The grammarFileName allows composite grammars to jump around among + multiple grammar files. + + + + + Because rules can have lots of alternatives, it is very useful to + know which alt you are entering. This is 1..n for n alts. + + + + + This is the last thing executed before leaving a rule. It is + executed even if an exception is thrown. This is triggered after + error reporting and recovery have occurred (unless the exception is + not caught in this rule). This implies an "exitAlt" event. + The grammarFileName allows composite grammars to jump around among + multiple grammar files. + + + + Track entry into any (...) subrule other EBNF construct + + + + Every decision, fixed k or arbitrary, has an enter/exit event + so that a GUI can easily track what LT/consume events are + associated with prediction. You will see a single enter/exit + subrule but multiple enter/exit decision events, one for each + loop iteration. + + + + + An input token was consumed; matched by any kind of element. + Trigger after the token was matched by things like match(), matchAny(). + + + + + An off-channel input token was consumed. + Trigger after the token was matched by things like match(), matchAny(). + (unless of course the hidden token is first stuff in the input stream). + + + + + Somebody (anybody) looked ahead. Note that this actually gets + triggered by both LA and LT calls. The debugger will want to know + which Token object was examined. Like consumeToken, this indicates + what token was seen at that depth. A remote debugger cannot look + ahead into a file it doesn't have so LT events must pass the token + even if the info is redundant. + + + + + The parser is going to look arbitrarily ahead; mark this location, + the token stream's marker is sent in case you need it. + + + + + After an arbitrairly long lookahead as with a cyclic DFA (or with + any backtrack), this informs the debugger that stream should be + rewound to the position associated with marker. + + + + + Rewind to the input position of the last marker. + Used currently only after a cyclic DFA and just + before starting a sem/syn predicate to get the + input position back to the start of the decision. + Do not "pop" the marker off the state. mark(i) + and rewind(i) should balance still. + + + + + To watch a parser move through the grammar, the parser needs to + inform the debugger what line/charPos it is passing in the grammar. + For now, this does not know how to switch from one grammar to the + other and back for island grammars etc... + + + + This should also allow breakpoints because the debugger can stop + the parser whenever it hits this line/pos. + + + + + A recognition exception occurred such as NoViableAltException. I made + this a generic event so that I can alter the exception hierachy later + without having to alter all the debug objects. + + + + Upon error, the stack of enter rule/subrule must be properly unwound. + If no viable alt occurs it is within an enter/exit decision, which + also must be rewound. Even the rewind for each mark must be unwount. + In the Java target this is pretty easy using try/finally, if a bit + ugly in the generated code. The rewind is generated in DFA.predict() + actually so no code needs to be generated for that. For languages + w/o this "finally" feature (C++?), the target implementor will have + to build an event stack or something. + + Across a socket for remote debugging, only the RecognitionException + data fields are transmitted. The token object or whatever that + caused the problem was the last object referenced by LT. The + immediately preceding LT event should hold the unexpected Token or + char. + + Here is a sample event trace for grammar: + + b : C ({;}A|B) // {;} is there to prevent A|B becoming a set + | D + ; + + The sequence for this rule (with no viable alt in the subrule) for + input 'c c' (there are 3 tokens) is: + + commence + LT(1) + enterRule b + location 7 1 + enter decision 3 + LT(1) + exit decision 3 + enterAlt1 + location 7 5 + LT(1) + consumeToken [c/<4>,1:0] + location 7 7 + enterSubRule 2 + enter decision 2 + LT(1) + LT(1) + recognitionException NoViableAltException 2 1 2 + exit decision 2 + exitSubRule 2 + beginResync + LT(1) + consumeToken [c/<4>,1:1] + LT(1) + endResync + LT(-1) + exitRule b + terminate + + + + + Indicates the recognizer is about to consume tokens to resynchronize + the parser. Any consume events from here until the recovered event + are not part of the parse--they are dead tokens. + + + + + Indicates that the recognizer has finished consuming tokens in order + to resychronize. There may be multiple beginResync/endResync pairs + before the recognizer comes out of errorRecovery mode (in which + multiple errors are suppressed). This will be useful + in a gui where you want to probably grey out tokens that are consumed + but not matched to anything in grammar. Anything between + a beginResync/endResync pair was tossed out by the parser. + + + + A semantic predicate was evaluate with this result and action text + + + + Announce that parsing has begun. Not technically useful except for + sending events over a socket. A GUI for example will launch a thread + to connect and communicate with a remote parser. The thread will want + to notify the GUI when a connection is made. ANTLR parsers + trigger this upon entry to the first rule (the ruleLevel is used to + figure this out). + + + + + Parsing is over; successfully or not. Mostly useful for telling + remote debugging listeners that it's time to quit. When the rule + invocation level goes to zero at the end of a rule, we are done + parsing. + + + + + Input for a tree parser is an AST, but we know nothing for sure + about a node except its type and text (obtained from the adaptor). + This is the analog of the consumeToken method. Again, the ID is + the hashCode usually of the node so it only works if hashCode is + not implemented. If the type is UP or DOWN, then + the ID is not really meaningful as it's fixed--there is + just one UP node and one DOWN navigation node. + + + + + + + The tree parser lookedahead. If the type is UP or DOWN, + then the ID is not really meaningful as it's fixed--there is + just one UP node and one DOWN navigation node. + + + + + A nil was created (even nil nodes have a unique ID... + they are not "null" per se). As of 4/28/2006, this + seems to be uniquely triggered when starting a new subtree + such as when entering a subrule in automatic mode and when + building a tree in rewrite mode. + + + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only t.ID is set. + + + + + Upon syntax error, recognizers bracket the error with an error node + if they are building ASTs. + + + + + + Announce a new node built from token elements such as type etc... + + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only t.ID, type, text are + set. + + + + Announce a new node built from an existing token. + + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only node.ID and token.tokenIndex + are set. + + + + Make a node the new root of an existing root. See + + + Note: the newRootID parameter is possibly different + than the TreeAdaptor.becomeRoot() newRoot parameter. + In our case, it will always be the result of calling + TreeAdaptor.becomeRoot() and not root_n or whatever. + + The listener should assume that this event occurs + only when the current subrule (or rule) subtree is + being reset to newRootID. + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only IDs are set. + + + + + + Make childID a child of rootID. + + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only IDs are set. + + + + + + Set the token start/stop token index for a subtree root or node. + + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only t.ID is set. + + + + A DFA implemented as a set of transition tables. + + + Any state that has a semantic predicate edge is special; those states + are generated with if-then-else structures in a specialStateTransition() + which is generated by cyclicDFA template. + + There are at most 32767 states (16-bit signed short). + Could get away with byte sometimes but would have to generate different + types and the simulation code too. For a point of reference, the Java + lexer's Tokens rule DFA has 326 states roughly. + + + + Which recognizer encloses this DFA? Needed to check backtracking + + + + From the input stream, predict what alternative will succeed + using this DFA (representing the covering regular approximation + to the underlying CFL). Return an alternative number 1..n. Throw + an exception upon error. + + + + A hook for debugging interface + + + + Given a String that has a run-length-encoding of some unsigned shorts + like "\1\2\3\9", convert to short[] {2,9,9,9}. We do this to avoid + static short[] which generates so much init code that the class won't + compile. :( + + + + Hideous duplication of code, but I need different typed arrays out :( + + + The recognizer did not match anything for a (..)+ loop. + + + + A semantic predicate failed during validation. Validation of predicates + occurs when normally parsing the alternative just like matching a token. + Disambiguating predicate evaluation occurs when we hoist a predicate into + a prediction decision. + + + + AST rules have trees + + + Has a value potentially if output=AST; + + + AST rules have trees + + + Has a value potentially if output=AST; + + + A source of characters for an ANTLR lexer + + + + For infinite streams, you don't need this; primarily I'm providing + a useful interface for action code. Just make sure actions don't + use this on streams that don't support it. + + + + + Get the ith character of lookahead. This is the same usually as + LA(i). This will be used for labels in the generated + lexer code. I'd prefer to return a char here type-wise, but it's + probably better to be 32-bit clean and be consistent with LA. + + + + ANTLR tracks the line information automatically + Because this stream can rewind, we need to be able to reset the line + + + The index of the character relative to the beginning of the line 0..n-1 + + + + A simple stream of integers used when all I care about is the char + or token type sequence (such as interpretation). + + + + + Get int at current input pointer + i ahead where i=1 is next int. + Negative indexes are allowed. LA(-1) is previous token (token + just matched). LA(-i) where i is before first token should + yield -1, invalid char / EOF. + + + + + Tell the stream to start buffering if it hasn't already. Return + current input position, Index, or some other marker so that + when passed to rewind() you get back to the same spot. + rewind(mark()) should not affect the input cursor. The Lexer + track line/col info as well as input index so its markers are + not pure input indexes. Same for tree node streams. + + + + + Return the current input symbol index 0..n where n indicates the + last symbol has been read. The index is the symbol about to be + read not the most recently read symbol. + + + + + Reset the stream so that next call to index would return marker. + The marker will usually be Index but it doesn't have to be. It's + just a marker to indicate what state the stream was in. This is + essentially calling release() and seek(). If there are markers + created after this marker argument, this routine must unroll them + like a stack. Assume the state the stream was in when this marker + was created. + + + + + Rewind to the input position of the last marker. + Used currently only after a cyclic DFA and just + before starting a sem/syn predicate to get the + input position back to the start of the decision. + Do not "pop" the marker off the state. mark(i) + and rewind(i) should balance still. It is + like invoking rewind(last marker) but it should not "pop" + the marker off. It's like seek(last marker's input position). + + + + + You may want to commit to a backtrack but don't want to force the + stream to keep bookkeeping objects around for a marker that is + no longer necessary. This will have the same behavior as + rewind() except it releases resources without the backward seek. + This must throw away resources for all markers back to the marker + argument. So if you're nested 5 levels of mark(), and then release(2) + you have to release resources for depths 2..5. + + + + + Set the input cursor to the position indicated by index. This is + normally used to seek ahead in the input stream. No buffering is + required to do this unless you know your stream will use seek to + move backwards such as when backtracking. + + + + This is different from rewind in its multi-directional + requirement and in that its argument is strictly an input cursor (index). + + For char streams, seeking forward must update the stream state such + as line number. For seeking backwards, you will be presumably + backtracking using the mark/rewind mechanism that restores state and + so this method does not need to update state when seeking backwards. + + Currently, this method is only used for efficient backtracking using + memoization, but in the future it may be used for incremental parsing. + + The index is 0..n-1. A seek to position i means that LA(1) will + return the ith symbol. So, seeking to 0 means LA(1) will return the + first element in the stream. + + + + + Only makes sense for streams that buffer everything up probably, but + might be useful to display the entire stream or for testing. This + value includes a single EOF. + + + + + Where are you getting symbols from? Normally, implementations will + pass the buck all the way to the lexer who can ask its input stream + for the file name or whatever. + + + + + Rules can have start/stop info. + + + + + Gets the start element from the input stream + + + + + Gets the stop element from the input stream + + + + + Rules can have start/stop info. + + The element type of the input stream. + + + + Gets the start element from the input stream + + + + + Gets the stop element from the input stream + + + + Get the text of the token + + + The line number on which this token was matched; line=1..n + + + The index of the first character relative to the beginning of the line 0..n-1 + + + + An index from 0..n-1 of the token object in the input stream. + This must be valid in order to use the ANTLRWorks debugger. + + + + + From what character stream was this token created? You don't have to + implement but it's nice to know where a Token comes from if you have + include files etc... on the input. + + + + + A source of tokens must provide a sequence of tokens via nextToken() + and also must reveal it's source of characters; CommonToken's text is + computed from a CharStream; it only store indices into the char stream. + + + + Errors from the lexer are never passed to the parser. Either you want + to keep going or you do not upon token recognition error. If you do not + want to continue lexing then you do not want to continue parsing. Just + throw an exception not under RecognitionException and Java will naturally + toss you all the way out of the recognizers. If you want to continue + lexing then you should not throw an exception to the parser--it has already + requested a token. Keep lexing until you get a valid one. Just report + errors and keep going, looking for a valid token. + + + + + Return a Token object from your input stream (usually a CharStream). + Do not fail/return upon lexing error; keep chewing on the characters + until you get a good one; errors are not passed through to the parser. + + + + + Where are you getting tokens from? normally the implication will simply + ask lexers input stream. + + + + A stream of tokens accessing tokens from a TokenSource + + + Get Token at current input pointer + i ahead where i=1 is next Token. + i<0 indicates tokens in the past. So -1 is previous token and -2 is + two tokens ago. LT(0) is undefined. For i>=n, return Token.EOFToken. + Return null for LT(0) and any index that results in an absolute address + that is negative. + + + + How far ahead has the stream been asked to look? The return + value is a valid index from 0..n-1. + + + + + Get a token at an absolute index i; 0..n-1. This is really only + needed for profiling and debugging and token stream rewriting. + If you don't want to buffer up tokens, then this method makes no + sense for you. Naturally you can't use the rewrite stream feature. + I believe DebugTokenStream can easily be altered to not use + this method, removing the dependency. + + + + + Where is this stream pulling tokens from? This is not the name, but + the object that provides Token objects. + + + + + Return the text of all tokens from start to stop, inclusive. + If the stream does not buffer all the tokens then it can just + return "" or null; Users should not access $ruleLabel.text in + an action of course in that case. + + + + + Because the user is not required to use a token with an index stored + in it, we must provide a means for two token objects themselves to + indicate the start/end location. Most often this will just delegate + to the other toString(int,int). This is also parallel with + the TreeNodeStream.toString(Object,Object). + + + + + The most common stream of tokens is one where every token is buffered up + and tokens are prefiltered for a certain channel (the parser will only + see these tokens and cannot change the filter channel number during the + parse). + + + TODO: how to access the full token stream? How to track all tokens matched per rule? + + + + Record every single token pulled from the source so we can reproduce + chunks of it later. + + + + Map from token type to channel to override some Tokens' channel numbers + + + Set of token types; discard any tokens with this type + + + Skip tokens on any channel but this one; this is how we skip whitespace... + + + By default, track all incoming tokens + + + Track the last mark() call result value for use in rewind(). + + + + The index into the tokens list of the current token (next token + to consume). p==-1 indicates that the tokens list is empty + + + + + How deep have we gone? + + + + Reset this token stream by setting its token source. + + + + Load all tokens from the token source and put in tokens. + This is done upon first LT request because you might want to + set some token type / channel overrides before filling buffer. + + + + + Move the input pointer to the next incoming token. The stream + must become active with LT(1) available. consume() simply + moves the input pointer so that LT(1) points at the next + input symbol. Consume at least one token. + + + + Walk past any token not on the channel the parser is listening to. + + + + Given a starting index, return the index of the first on-channel token. + + + + A simple filter mechanism whereby you can tell this token stream + to force all tokens of type ttype to be on channel. For example, + when interpreting, we cannot exec actions so we need to tell + the stream to force all WS and NEWLINE to be a different, ignored + channel. + + + + + Given a start and stop index, return a List of all tokens in + the token type BitSet. Return null if no tokens were found. This + method looks at both on and off channel tokens. + + + + + Get the ith token from the current position 1..n where k=1 is the + first symbol of lookahead. + + + + Look backwards k tokens on-channel tokens + + + + Return absolute token i; ignore which channel the tokens are on; + that is, count all tokens not just on-channel tokens. + + + + + A lexer is recognizer that draws input symbols from a character stream. + lexer grammars result in a subclass of this object. A Lexer object + uses simplified match() and error recovery mechanisms in the interest + of speed. + + + + Where is the lexer drawing characters from? + + + + Gets or sets the text matched so far for the current token or any text override. + + + Setting this value replaces any previously set value, and overrides the original text. + + + + Return a token from this source; i.e., match a token on the char stream. + + + Returns the EOF token (default), if you need + to return a custom token instead override this method. + + + + Instruct the lexer to skip creating a token for current lexer rule + and look for another token. nextToken() knows to keep looking when + a lexer rule finishes with token set to SKIP_TOKEN. Recall that + if token==null at end of any token rule, it creates one for you + and emits it. + + + + This is the lexer entry point that sets instance var 'token' + + + + Currently does not support multiple emits per nextToken invocation + for efficiency reasons. Subclass and override this method and + nextToken (to push tokens into a list and pull from that list rather + than a single variable as this implementation does). + + + + + The standard method called to automatically emit a token at the + outermost lexical rule. The token object should point into the + char buffer start..stop. If there is a text override in 'text', + use that to set the token's text. Override this method to emit + custom Token objects. + + + + If you are building trees, then you should also override + Parser or TreeParser.getMissingSymbol(). + + + + What is the index of the current character of lookahead? + + + + Lexers can normally match any char in it's vocabulary after matching + a token, so do the easy thing and just kill a character and hope + it all works out. You can instead use the rule invocation stack + to do sophisticated error recovery if you are in a fragment rule. + + + + A queue that can dequeue and get(i) in O(1) and grow arbitrarily large. + A linked list is fast at dequeue but slow at get(i). An array is + the reverse. This is O(1) for both operations. + + List grows until you dequeue last element at end of buffer. Then + it resets to start filling at 0 again. If adds/removes are balanced, the + buffer will not grow too large. + + No iterator stuff as that's not how we'll use it. + + + dynamically-sized buffer of elements + + + index of next element to fill + + + + How deep have we gone? + + + + + Return element {@code i} elements ahead of current element. {@code i==0} + gets current element. This is not an absolute index into {@link #data} + since {@code p} defines the start of the real list. + + + + Get and remove first element in queue + + + Return string of current buffer contents; non-destructive + + + + A lookahead queue that knows how to mark/release locations in the buffer for + backtracking purposes. Any markers force the {@link FastQueue} superclass to + keep all elements until no more markers; then can reset to avoid growing a + huge buffer. + + + + Absolute token index. It's the index of the symbol about to be + read via {@code LT(1)}. Goes from 0 to numtokens. + + + This is the {@code LT(-1)} element for the first element in {@link #data}. + + + Track object returned by nextElement upon end of stream; + Return it later when they ask for LT passed end of input. + + + Track the last mark() call result value for use in rewind(). + + + tracks how deep mark() calls are nested + + + + Implement nextElement to supply a stream of elements to this + lookahead buffer. Return EOF upon end of the stream we're pulling from. + + + + + Get and remove first element in queue; override + {@link FastQueue#remove()}; it's the same, just checks for backtracking. + + + + Make sure we have at least one element to remove, even if EOF + + + + Make sure we have 'need' elements from current position p. Last valid + p index is data.size()-1. p+need-1 is the data index 'need' elements + ahead. If we need 1 element, (p+1-1)==p must be < data.size(). + + + + add n elements to buffer + + + Size of entire stream is unknown; we only know buffer size from FastQueue + + + + Seek to a 0-indexed absolute token index. Normally used to seek backwards + in the buffer. Does not force loading of nodes. + + + To preserve backward compatibility, this method allows seeking past the + end of the currently buffered data. In this case, the input pointer will + be moved but the data will only actually be loaded upon the next call to + {@link #consume} or {@link #LT} for {@code k>0}. + + + + A mismatched char or Token or tree node + + + + We were expecting a token but it's not found. The current token + is actually what we wanted next. Used for tree node errors too. + + + + + A parser for TokenStreams. "parser grammars" result in a subclass + of this. + + + + Gets or sets the token stream; resets the parser upon a set. + + + + Rules that return more than a single value must return an object + containing all the values. Besides the properties defined in + RuleLabelScope.predefinedRulePropertiesScope there may be user-defined + return values. This class simply defines the minimum properties that + are always defined and methods to access the others that might be + available depending on output option such as template and tree. + + + + Note text is not an actual property of the return value, it is computed + from start and stop using the input stream's toString() method. I + could add a ctor to this so that we can pass in and store the input + stream, but I'm not sure we want to do that. It would seem to be undefined + to get the .text property anyway if the rule matches tokens from multiple + input streams. + + I do not use getters for fields of objects that are used simply to + group values such as this aggregate. The getters/setters are there to + satisfy the superclass interface. + + + + The root of the ANTLR exception hierarchy. + + + To avoid English-only error messages and to generally make things + as flexible as possible, these exceptions are not created with strings, + but rather the information necessary to generate an error. Then + the various reporting methods in Parser and Lexer can be overridden + to generate a localized error message. For example, MismatchedToken + exceptions are built with the expected token type. + So, don't expect getMessage() to return anything. + + Note that as of Java 1.4, you can access the stack trace, which means + that you can compute the complete trace of rules from the start symbol. + This gives you considerable context information with which to generate + useful error messages. + + ANTLR generates code that throws exceptions upon recognition error and + also generates code to catch these exceptions in each rule. If you + want to quit upon first error, you can turn off the automatic error + handling mechanism using rulecatch action, but you still need to + override methods mismatch and recoverFromMismatchSet. + + In general, the recognition exceptions can track where in a grammar a + problem occurred and/or what was the expected input. While the parser + knows its state (such as current input symbol and line info) that + state can change before the exception is reported so current token index + is computed and stored at exception time. From this info, you can + perhaps print an entire line of input not just a single token, for example. + Better to just say the recognizer had a problem and then let the parser + figure out a fancy report. + + + + What input stream did the error occur in? + + + + What was the lookahead index when this exception was thrown? + + + + What is index of token/char were we looking at when the error occurred? + + + + The current Token when an error occurred. Since not all streams + can retrieve the ith Token, we have to track the Token object. + For parsers. Even when it's a tree parser, token might be set. + + + + + If this is a tree parser exception, node is set to the node with + the problem. + + + + The current char when an error occurred. For lexers. + + + + Track the line (1-based) at which the error occurred in case this is + generated from a lexer. We need to track this since the + unexpected char doesn't carry the line info. + + + + + The 0-based index into the line where the error occurred. + + + + + If you are parsing a tree node stream, you will encounter som + imaginary nodes w/o line/col info. We now search backwards looking + for most recent token with line/col info, but notify getErrorHeader() + that info is approximate. + + + + Used for remote debugger deserialization + + + Return the token type or char of the unexpected input element + + + + The set of fields needed by an abstract recognizer to recognize input + and recover from errors etc... As a separate state object, it can be + shared among multiple grammars; e.g., when one grammar imports another. + + + + These fields are publically visible but the actual state pointer per + parser is protected. + + + + + Track the set of token types that can follow any rule invocation. + Stack grows upwards. When it hits the max, it grows 2x in size + and keeps going. + + + + + This is true when we see an error and before having successfully + matched a token. Prevents generation of more than one error message + per error. + + + + + The index into the input stream where the last error occurred. + This is used to prevent infinite loops where an error is found + but no token is consumed during recovery...another error is found, + ad naseum. This is a failsafe mechanism to guarantee that at least + one token/tree node is consumed for two errors. + + + + + In lieu of a return value, this indicates that a rule or token + has failed to match. Reset to false upon valid token match. + + + + Did the recognizer encounter a syntax error? Track how many. + + + + If 0, no backtracking is going on. Safe to exec actions etc... + If >0 then it's the level of backtracking. + + + + + An array[size num rules] of dictionaries that tracks + the stop token index for each rule. ruleMemo[ruleIndex] is + the memoization table for ruleIndex. For key ruleStartIndex, you + get back the stop token for associated rule or MEMO_RULE_FAILED. + + + This is only used if rule memoization is on (which it is by default). + + + + The goal of all lexer rules/methods is to create a token object. + This is an instance variable as multiple rules may collaborate to + create a single token. nextToken will return this object after + matching lexer rule(s). If you subclass to allow multiple token + emissions, then set this to the last token to be matched or + something nonnull so that the auto token emit mechanism will not + emit another token. + + + + + What character index in the stream did the current token start at? + Needed, for example, to get the text for current token. Set at + the start of nextToken. + + + + The line on which the first character of the token resides + + + The character position of first character within the line + + + The channel number for the current token + + + The token type for the current token + + + + You can set the text for the current token to override what is in + the input char buffer. Use setText() or can set this instance var. + + + + + All tokens go to the parser (unless skip() is called in that rule) + on a particular "channel". The parser tunes to a particular channel + so that whitespace etc... can go to the parser on a "hidden" channel. + + + + + Anything on different channel than DEFAULT_CHANNEL is not parsed + by parser. + + + + Useful for dumping out the input stream after doing some + augmentation or other manipulations. + + You can insert stuff, replace, and delete chunks. Note that the + operations are done lazily--only if you convert the buffer to a + String. This is very efficient because you are not moving data around + all the time. As the buffer of tokens is converted to strings, the + toString() method(s) check to see if there is an operation at the + current index. If so, the operation is done and then normal String + rendering continues on the buffer. This is like having multiple Turing + machine instruction streams (programs) operating on a single input tape. :) + + Since the operations are done lazily at toString-time, operations do not + screw up the token index values. That is, an insert operation at token + index i does not change the index values for tokens i+1..n-1. + + Because operations never actually alter the buffer, you may always get + the original token stream back without undoing anything. Since + the instructions are queued up, you can easily simulate transactions and + roll back any changes if there is an error just by removing instructions. + For example, + + CharStream input = new ANTLRFileStream("input"); + TLexer lex = new TLexer(input); + TokenRewriteStream tokens = new TokenRewriteStream(lex); + T parser = new T(tokens); + parser.startRule(); + + Then in the rules, you can execute + Token t,u; + ... + input.insertAfter(t, "text to put after t");} + input.insertAfter(u, "text after u");} + System.out.println(tokens.toString()); + + Actually, you have to cast the 'input' to a TokenRewriteStream. :( + + You can also have multiple "instruction streams" and get multiple + rewrites from a single pass over the input. Just name the instruction + streams and use that name again when printing the buffer. This could be + useful for generating a C file and also its header file--all from the + same buffer: + + tokens.insertAfter("pass1", t, "text to put after t");} + tokens.insertAfter("pass2", u, "text after u");} + System.out.println(tokens.toString("pass1")); + System.out.println(tokens.toString("pass2")); + + If you don't use named rewrite streams, a "default" stream is used as + the first example shows. + + + What index into rewrites List are we? + + + Token buffer index. + + + + Execute the rewrite operation by possibly adding to the buffer. + Return the index of the next token to operate on. + + + + + I'm going to try replacing range from x..y with (y-x)+1 ReplaceOp + instructions. + + + + + You may have multiple, named streams of rewrite operations. + I'm calling these things "programs." + Maps String (name) -> rewrite (List) + + + + Map String (program name) -> Integer index + + + + Rollback the instruction stream for a program so that + the indicated instruction (via instructionIndex) is no + longer in the stream. UNTESTED! + + + + Reset the program so that no instructions exist + + + We need to combine operations and report invalid operations (like + overlapping replaces that are not completed nested). Inserts to + same index need to be combined etc... Here are the cases: + + I.i.u I.j.v leave alone, nonoverlapping + I.i.u I.i.v combine: Iivu + + R.i-j.u R.x-y.v | i-j in x-y delete first R + R.i-j.u R.i-j.v delete first R + R.i-j.u R.x-y.v | x-y in i-j ERROR + R.i-j.u R.x-y.v | boundaries overlap ERROR + + Delete special case of replace (text==null): + D.i-j.u D.x-y.v | boundaries overlap combine to max(min)..max(right) + + I.i.u R.x-y.v | i in (x+1)-y delete I (since insert before + we're not deleting i) + I.i.u R.x-y.v | i not in (x+1)-y leave alone, nonoverlapping + R.x-y.v I.i.u | i in x-y ERROR + R.x-y.v I.x.u R.x-y.uv (combine, delete I) + R.x-y.v I.i.u | i not in x-y leave alone, nonoverlapping + + I.i.u = insert u before op @ index i + R.x-y.u = replace x-y indexed tokens with u + + First we need to examine replaces. For any replace op: + + 1. wipe out any insertions before op within that range. + 2. Drop any replace op before that is contained completely within + that range. + 3. Throw exception upon boundary overlap with any previous replace. + + Then we can deal with inserts: + + 1. for any inserts to same index, combine even if not adjacent. + 2. for any prior replace with same left boundary, combine this + insert with replace and delete this replace. + 3. throw exception if index in same range as previous replace + + Don't actually delete; make op null in list. Easier to walk list. + Later we can throw as we add to index -> op map. + + Note that I.2 R.2-2 will wipe out I.2 even though, technically, the + inserted stuff would be before the replace range. But, if you + add tokens in front of a method body '{' and then delete the method + body, I think the stuff before the '{' you added should disappear too. + + Return a map from token index to operation. + + + Get all operations before an index of a particular kind + + + + In an action, a lexer rule can set token to this SKIP_TOKEN and ANTLR + will avoid creating a token for this symbol and try to fetch another. + + + + imaginary tree navigation type; traverse "get child" link + + + imaginary tree navigation type; finish with a child list + + + + A generic tree implementation with no payload. You must subclass to + actually have any user data. ANTLR v3 uses a list of children approach + instead of the child-sibling approach in v2. A flat tree (a list) is + an empty node whose children represent the list. An empty, but + non-null node is called "nil". + + + + + Create a new node from an existing node does nothing for BaseTree + as there are no fields other than the children list, which cannot + be copied as the children are not considered part of this node. + + + + + Get the children internal List; note that if you directly mess with + the list, do so at your own risk. + + + + BaseTree doesn't track parent pointers. + + + BaseTree doesn't track child indexes. + + + Add t as child of this node. + + + Warning: if t has no children, but child does + and child isNil then this routine moves children to t via + t.children = child.children; i.e., without copying the array. + + + + Add all elements of kids list as children of this node + + + Insert child t at child position i (0..n-1) by shifting children + i+1..n-1 to the right one position. Set parent / indexes properly + but does NOT collapse nil-rooted t's that come in here like addChild. + + + + Delete children from start to stop and replace with t even if t is + a list (nil-root tree). num of children can increase or decrease. + For huge child lists, inserting children can force walking rest of + children to set their childindex; could be slow. + + + + Override in a subclass to change the impl of children list + + + Set the parent and child index values for all child of t + + + Walk upwards looking for ancestor with this token type. + + + Walk upwards and get first ancestor with this token type. + + + + Return a list of all ancestors of this node. The first node of + list is the root and the last is the parent of this node. + + + + Print out a whole tree not just a node + + + Override to say how a node (not a tree) should look as text + + + A TreeAdaptor that works with any Tree implementation. + + + + System.identityHashCode() is not always unique; we have to + track ourselves. That's ok, it's only for debugging, though it's + expensive: we have to create a hashtable with all tree nodes in it. + + + + + Create tree node that holds the start and stop tokens associated + with an error. + + + + If you specify your own kind of tree nodes, you will likely have to + override this method. CommonTree returns Token.INVALID_TOKEN_TYPE + if no token payload but you might have to set token type for diff + node type. + + You don't have to subclass CommonErrorNode; you will likely need to + subclass your own tree node class to avoid class cast exception. + + + + + This is generic in the sense that it will work with any kind of + tree (not just ITree interface). It invokes the adaptor routines + not the tree node routines to do the construction. + + + + + Add a child to the tree t. If child is a flat tree (a list), make all + in list children of t. Warning: if t has no children, but child does + and child isNil then you can decide it is ok to move children to t via + t.children = child.children; i.e., without copying the array. Just + make sure that this is consistent with have the user will build + ASTs. + + + + + If oldRoot is a nil root, just copy or move the children to newRoot. + If not a nil root, make oldRoot a child of newRoot. + + + + old=^(nil a b c), new=r yields ^(r a b c) + old=^(a b c), new=r yields ^(r ^(a b c)) + + If newRoot is a nil-rooted single child tree, use the single + child as the new root node. + + old=^(nil a b c), new=^(nil r) yields ^(r a b c) + old=^(a b c), new=^(nil r) yields ^(r ^(a b c)) + + If oldRoot was null, it's ok, just return newRoot (even if isNil). + + old=null, new=r yields r + old=null, new=^(nil r) yields ^(nil r) + + Return newRoot. Throw an exception if newRoot is not a + simple node or nil root with a single child node--it must be a root + node. If newRoot is ^(nil x) return x as newRoot. + + Be advised that it's ok for newRoot to point at oldRoot's + children; i.e., you don't have to copy the list. We are + constructing these nodes so we should have this control for + efficiency. + + + + Transform ^(nil x) to x and nil to null + + + + Tell me how to create a token for use with imaginary token nodes. + For example, there is probably no input symbol associated with imaginary + token DECL, but you need to create it as a payload or whatever for + the DECL node as in ^(DECL type ID). + + + + If you care what the token payload objects' type is, you should + override this method and any other createToken variant. + + + + + Tell me how to create a token for use with imaginary token nodes. + For example, there is probably no input symbol associated with imaginary + token DECL, but you need to create it as a payload or whatever for + the DECL node as in ^(DECL type ID). + + + + This is a variant of createToken where the new token is derived from + an actual real input token. Typically this is for converting '{' + tokens to BLOCK etc... You'll see + + r : lc='{' ID+ '}' -> ^(BLOCK[$lc] ID+) ; + + If you care what the token payload objects' type is, you should + override this method and any other createToken variant. + + + + + Duplicate a node. This is part of the factory; + override if you want another kind of node to be built. + + + + I could use reflection to prevent having to override this + but reflection is slow. + + + + + Track start/stop token for subtree root created for a rule. + Only works with Tree nodes. For rules that match nothing, + seems like this will yield start=i and stop=i-1 in a nil node. + Might be useful info so I'll not force to be i..i. + + + + A buffered stream of tree nodes. Nodes can be from a tree of ANY kind. + + This node stream sucks all nodes out of the tree specified in + the constructor during construction and makes pointers into + the tree using an array of Object pointers. The stream necessarily + includes pointers to DOWN and UP and EOF nodes. + + This stream knows how to mark/release for backtracking. + + This stream is most suitable for tree interpreters that need to + jump around a lot or for tree parsers requiring speed (at cost of memory). + There is some duplicated functionality here with UnBufferedTreeNodeStream + but just in bookkeeping, not tree walking etc... + + TARGET DEVELOPERS: + + This is the old CommonTreeNodeStream that buffered up entire node stream. + No need to implement really as new CommonTreeNodeStream is much better + and covers what we need. + + @see CommonTreeNodeStream + + + The complete mapping from stream index to tree node. + This buffer includes pointers to DOWN, UP, and EOF nodes. + It is built upon ctor invocation. The elements are type + Object as we don't what the trees look like. + + Load upon first need of the buffer so we can set token types + of interest for reverseIndexing. Slows us down a wee bit to + do all of the if p==-1 testing everywhere though. + + + Pull nodes from which tree? + + + IF this tree (root) was created from a token stream, track it. + + + What tree adaptor was used to build these trees + + + Reuse same DOWN, UP navigation nodes unless this is true + + + The index into the nodes list of the current node (next node + to consume). If -1, nodes array not filled yet. + + + Track the last mark() call result value for use in rewind(). + + + Stack of indexes used for push/pop calls + + + Walk tree with depth-first-search and fill nodes buffer. + Don't do DOWN, UP nodes if its a list (t is isNil). + + + What is the stream index for node? 0..n-1 + Return -1 if node not found. + + + As we flatten the tree, we use UP, DOWN nodes to represent + the tree structure. When debugging we need unique nodes + so instantiate new ones when uniqueNavigationNodes is true. + + + Look backwards k nodes + + + + Make stream jump to a new location, saving old location. + Switch back with pop(). + + + + + Seek back to previous index saved during last push() call. + Return top of stack (return index). + + + + Used for testing, just return the token type stream + + + Debugging + + + A node representing erroneous token range in token stream + + + + A tree node that is wrapper for a Token object. After 3.0 release + while building tree rewrite stuff, it became clear that computing + parent and child index is very difficult and cumbersome. Better to + spend the space in every tree node. If you don't want these extra + fields, it's easy to cut them out in your own BaseTree subclass. + + + + A single token is the payload + + + + What token indexes bracket all tokens associated with this node + and below? + + + + Who is the parent node of this node; if null, implies node is root + + + What index is this node in the child list? Range: 0..n-1 + + + + For every node in this subtree, make sure it's start/stop token's + are set. Walk depth first, visit bottom up. Only updates nodes + with at least one token index < 0. + + + + + A TreeAdaptor that works with any Tree implementation. It provides + really just factory methods; all the work is done by BaseTreeAdaptor. + If you would like to have different tokens created than ClassicToken + objects, you need to override this and then set the parser tree adaptor to + use your subclass. + + + + To get your parser to build nodes of a different type, override + create(Token), errorNode(), and to be safe, YourTreeClass.dupNode(). + dupNode is called to duplicate nodes during rewrite operations. + + + + + Tell me how to create a token for use with imaginary token nodes. + For example, there is probably no input symbol associated with imaginary + token DECL, but you need to create it as a payload or whatever for + the DECL node as in ^(DECL type ID). + + + + If you care what the token payload objects' type is, you should + override this method and any other createToken variant. + + + + + Tell me how to create a token for use with imaginary token nodes. + For example, there is probably no input symbol associated with imaginary + token DECL, but you need to create it as a payload or whatever for + the DECL node as in ^(DECL type ID). + + + + This is a variant of createToken where the new token is derived from + an actual real input token. Typically this is for converting '{' + tokens to BLOCK etc... You'll see + + r : lc='{' ID+ '}' -> ^(BLOCK[$lc] ID+) ; + + If you care what the token payload objects' type is, you should + override this method and any other createToken variant. + + + + + What is the Token associated with this node? If + you are not using CommonTree, then you must + override this in your own adaptor. + + + + Pull nodes from which tree? + + + If this tree (root) was created from a token stream, track it. + + + What tree adaptor was used to build these trees + + + The tree iterator we are using + + + Stack of indexes used for push/pop calls + + + Tree (nil A B C) trees like flat A B C streams + + + Tracks tree depth. Level=0 means we're at root node level. + + + Tracks the last node before the start of {@link #data} which contains + position information to provide information for error reporting. This is + tracked in addition to {@link #prevElement} which may or may not contain + position information. + + @see #hasPositionInformation + @see RecognitionException#extractInformationFromTreeNodeStream + + + Make stream jump to a new location, saving old location. + Switch back with pop(). + + + Seek back to previous index saved during last push() call. + Return top of stack (return index). + + + Returns an element containing position information. If {@code allowApproximateLocation} is {@code false}, then + this method will return the {@code LT(1)} element if it contains position information, and otherwise return {@code null}. + If {@code allowApproximateLocation} is {@code true}, then this method will return the last known element containing position information. + + @see #hasPositionInformation + + + For debugging; destructive: moves tree iterator to end. + + + A utility class to generate DOT diagrams (graphviz) from + arbitrary trees. You can pass in your own templates and + can pass in any kind of tree or use Tree interface method. + I wanted this separator so that you don't have to include + ST just to use the org.antlr.runtime.tree.* package. + This is a set of non-static methods so you can subclass + to override. For example, here is an invocation: + + CharStream input = new ANTLRInputStream(System.in); + TLexer lex = new TLexer(input); + CommonTokenStream tokens = new CommonTokenStream(lex); + TParser parser = new TParser(tokens); + TParser.e_return r = parser.e(); + Tree t = (Tree)r.tree; + System.out.println(t.toStringTree()); + DOTTreeGenerator gen = new DOTTreeGenerator(); + StringTemplate st = gen.toDOT(t); + System.out.println(st); + + + Track node to number mapping so we can get proper node name back + + + Track node number so we can get unique node names + + + Generate DOT (graphviz) for a whole tree not just a node. + For example, 3+4*5 should generate: + + digraph { + node [shape=plaintext, fixedsize=true, fontsize=11, fontname="Courier", + width=.4, height=.2]; + edge [arrowsize=.7] + "+"->3 + "+"->"*" + "*"->4 + "*"->5 + } + + Takes a Tree interface object. + + + + @author Sam Harwell + + + Returns an element containing concrete information about the current + position in the stream. + + @param allowApproximateLocation if {@code false}, this method returns + {@code null} if an element containing exact information about the current + position is not available + + + Determines if the specified {@code element} contains concrete position + information. + + @param element the element to check + @return {@code true} if {@code element} contains concrete position + information, otherwise {@code false} + + + + What does a tree look like? ANTLR has a number of support classes + such as CommonTreeNodeStream that work on these kinds of trees. You + don't have to make your trees implement this interface, but if you do, + you'll be able to use more support code. + + + + NOTE: When constructing trees, ANTLR can build any kind of tree; it can + even use Token objects as trees if you add a child list to your tokens. + + This is a tree node without any payload; just navigation and factory stuff. + + + + Is there is a node above with token type ttype? + + + Walk upwards and get first ancestor with this token type. + + + + Return a list of all ancestors of this node. The first node of + list is the root and the last is the parent of this node. + + + + This node is what child index? 0..n-1 + + + Set the parent and child index values for all children + + + + Add t as a child to this node. If t is null, do nothing. If t + is nil, add all children of t to this' children. + + + + Set ith child (0..n-1) to t; t must be non-null and non-nil node + + + + Delete children from start to stop and replace with t even if t is + a list (nil-root tree). num of children can increase or decrease. + For huge child lists, inserting children can force walking rest of + children to set their childindex; could be slow. + + + + + Indicates the node is a nil node but may still have children, meaning + the tree is a flat list. + + + + + What is the smallest token index (indexing from 0) for this node + and its children? + + + + + What is the largest token index (indexing from 0) for this node + and its children? + + + + Return a token type; needed for tree parsing + + + In case we don't have a token payload, what is the line for errors? + + + + How to create and navigate trees. Rather than have a separate factory + and adaptor, I've merged them. Makes sense to encapsulate. + + + + This takes the place of the tree construction code generated in the + generated code in 2.x and the ASTFactory. + + I do not need to know the type of a tree at all so they are all + generic Objects. This may increase the amount of typecasting needed. :( + + + + + Create a tree node from Token object; for CommonTree type trees, + then the token just becomes the payload. This is the most + common create call. + + + + Override if you want another kind of node to be built. + + + + + Create a new node derived from a token, with a new token type. + This is invoked from an imaginary node ref on right side of a + rewrite rule as IMAG[$tokenLabel]. + + + + This should invoke createToken(Token). + + + + + Same as create(tokenType,fromToken) except set the text too. + This is invoked from an imaginary node ref on right side of a + rewrite rule as IMAG[$tokenLabel, "IMAG"]. + + + + This should invoke createToken(Token). + + + + + Same as create(fromToken) except set the text too. + This is invoked when the text terminal option is set, as in + IMAG<text='IMAG'>. + + + + This should invoke createToken(Token). + + + + + Create a new node derived from a token, with a new token type. + This is invoked from an imaginary node ref on right side of a + rewrite rule as IMAG["IMAG"]. + + + + This should invoke createToken(int,String). + + + + Duplicate a single tree node. + Override if you want another kind of node to be built. + + + Duplicate tree recursively, using dupNode() for each node + + + + Return a nil node (an empty but non-null node) that can hold + a list of element as the children. If you want a flat tree (a list) + use "t=adaptor.nil(); t.addChild(x); t.addChild(y);" + + + + + Return a tree node representing an error. This node records the + tokens consumed during error recovery. The start token indicates the + input symbol at which the error was detected. The stop token indicates + the last symbol consumed during recovery. + + + + You must specify the input stream so that the erroneous text can + be packaged up in the error node. The exception could be useful + to some applications; default implementation stores ptr to it in + the CommonErrorNode. + + This only makes sense during token parsing, not tree parsing. + Tree parsing should happen only when parsing and tree construction + succeed. + + + + Is tree considered a nil node used to make lists of child nodes? + + + + Add a child to the tree t. If child is a flat tree (a list), make all + in list children of t. Warning: if t has no children, but child does + and child isNil then you can decide it is ok to move children to t via + t.children = child.children; i.e., without copying the array. Just + make sure that this is consistent with have the user will build + ASTs. Do nothing if t or child is null. + + + + + If oldRoot is a nil root, just copy or move the children to newRoot. + If not a nil root, make oldRoot a child of newRoot. + + + + old=^(nil a b c), new=r yields ^(r a b c) + old=^(a b c), new=r yields ^(r ^(a b c)) + + If newRoot is a nil-rooted single child tree, use the single + child as the new root node. + + old=^(nil a b c), new=^(nil r) yields ^(r a b c) + old=^(a b c), new=^(nil r) yields ^(r ^(a b c)) + + If oldRoot was null, it's ok, just return newRoot (even if isNil). + + old=null, new=r yields r + old=null, new=^(nil r) yields ^(nil r) + + Return newRoot. Throw an exception if newRoot is not a + simple node or nil root with a single child node--it must be a root + node. If newRoot is ^(nil x) return x as newRoot. + + Be advised that it's ok for newRoot to point at oldRoot's + children; i.e., you don't have to copy the list. We are + constructing these nodes so we should have this control for + efficiency. + + + + + Given the root of the subtree created for this rule, post process + it to do any simplifications or whatever you want. A required + behavior is to convert ^(nil singleSubtree) to singleSubtree + as the setting of start/stop indexes relies on a single non-nil root + for non-flat trees. + + + + Flat trees such as for lists like "idlist : ID+ ;" are left alone + unless there is only one ID. For a list, the start/stop indexes + are set in the nil node. + + This method is executed after all rule tree construction and right + before setTokenBoundaries(). + + + + For identifying trees. + + + How to identify nodes so we can say "add node to a prior node"? + Even becomeRoot is an issue. Use System.identityHashCode(node) + usually. + + + + + Create a node for newRoot make it the root of oldRoot. + If oldRoot is a nil root, just copy or move the children to newRoot. + If not a nil root, make oldRoot a child of newRoot. + + + + Return node created for newRoot. + + + + Be advised: when debugging ASTs, the DebugTreeAdaptor manually + calls create(Token child) and then plain becomeRoot(node, node) + because it needs to trap calls to create, but it can't since it delegates + to not inherits from the TreeAdaptor. + + + + For tree parsing, I need to know the token type of a node + + + Node constructors can set the type of a node + + + Node constructors can set the text of a node + + + + Return the token object from which this node was created. + Currently used only for printing an error message. + The error display routine in BaseRecognizer needs to + display where the input the error occurred. If your + tree of limitation does not store information that can + lead you to the token, you can create a token filled with + the appropriate information and pass that back. See + BaseRecognizer.getErrorMessage(). + + + + + Where are the bounds in the input token stream for this node and + all children? Each rule that creates AST nodes will call this + method right before returning. Flat trees (i.e., lists) will + still usually have a nil root node just to hold the children list. + That node would contain the start/stop indexes then. + + + + Get the token start index for this subtree; return -1 if no such index + + + Get the token stop index for this subtree; return -1 if no such index + + + Get a child 0..n-1 node + + + Set ith child (0..n-1) to t; t must be non-null and non-nil node + + + Remove ith child and shift children down from right. + + + How many children? If 0, then this is a leaf node + + + + Who is the parent node of this node; if null, implies node is root. + If your node type doesn't handle this, it's ok but the tree rewrites + in tree parsers need this functionality. + + + + + What index is this node in the child list? Range: 0..n-1 + If your node type doesn't handle this, it's ok but the tree rewrites + in tree parsers need this functionality. + + + + + Replace from start to stop child index of parent with t, which might + be a list. Number of children may be different after this call. + + + + If parent is null, don't do anything; must be at root of overall tree. + Can't replace whatever points to the parent externally. Do nothing. + + + + A stream of tree nodes, accessing nodes from a tree of some kind + + + + Get a tree node at an absolute index i; 0..n-1. + If you don't want to buffer up nodes, then this method makes no + sense for you. + + + + + Get tree node at current input pointer + ahead where + ==1 is next node. <0 indicates nodes in the past. So + {@code LT(-1)} is previous node, but implementations are not required to + provide results for < -1. {@code LT(0)} is undefined. For + <=n, return . Return for {@code LT(0)} + and any index that results in an absolute address that is negative. + + + + This is analogous to , but this returns a tree node + instead of a . Makes code generation identical for both + parser and tree grammars. + + + + + Where is this stream pulling nodes from? This is not the name, but + the object that provides node objects. + + + + + If the tree associated with this stream was created from a + {@link TokenStream}, you can specify it here. Used to do rule + {@code $text} attribute in tree parser. Optional unless you use tree + parser rule {@code $text} attribute or {@code output=template} and + {@code rewrite=true} options. + + + + + What adaptor can tell me how to interpret/navigate nodes and + trees. E.g., get text of a node. + + + + + As we flatten the tree, we use {@link Token#UP}, {@link Token#DOWN} nodes + to represent the tree structure. When debugging we need unique nodes so + we have to instantiate new ones. When doing normal tree parsing, it's + slow and a waste of memory to create unique navigation nodes. Default + should be {@code false}. + + + + + Return the text of all nodes from {@code start} to {@code stop}, + inclusive. If the stream does not buffer all the nodes then it can still + walk recursively from start until stop. You can always return + {@code null} or {@code ""} too, but users should not access + {@code $ruleLabel.text} in an action of course in that case. + + + + + Replace children of {@code parent} from index {@code startChildIndex} to + {@code stopChildIndex} with {@code t}, which might be a list. Number of + children may be different after this call. The stream is notified because + it is walking the tree and might need to know you are monkeying with the + underlying tree. Also, it might be able to modify the node stream to + avoid restreaming for future phases. + + + + If {@code parent} is {@code null}, don't do anything; must be at root of + overall tree. Can't replace whatever points to the parent externally. Do + nothing. + + + + + How to execute code for node t when a visitor visits node t. Execute + pre() before visiting children and execute post() after visiting children. + + + + + Execute an action before visiting children of t. Return t or + a rewritten t. It is up to the visitor to decide what to do + with the return value. Children of returned value will be + visited if using TreeVisitor.visit(). + + + + + Execute an action after visiting children of t. Return t or + a rewritten t. It is up to the visitor to decide what to do + with the return value. + + + + + A record of the rules used to match a token sequence. The tokens + end up as the leaves of this tree and rule nodes are the interior nodes. + This really adds no functionality, it is just an alias for CommonTree + that is more meaningful (specific) and holds a String to display for a node. + + + + + Emit a token and all hidden nodes before. EOF node holds all + hidden tokens after last real token. + + + + + Print out the leaves of this tree, which means printing original + input back out. + + + + + Base class for all exceptions thrown during AST rewrite construction. + This signifies a case where the cardinality of two or more elements + in a subrule are different: (ID INT)+ where |ID|!=|INT| + + + + No elements within a (...)+ in a rewrite rule + + + Ref to ID or expr but no tokens in ID stream or subtrees in expr stream + + + + A generic list of elements tracked in an alternative to be used in + a -> rewrite rule. We need to subclass to fill in the next() method, + which returns either an AST node wrapped around a token payload or + an existing subtree. + + + + Once you start next()ing, do not try to add more elements. It will + break the cursor tracking I believe. + + TODO: add mechanism to detect/puke on modification after reading from stream + + + + + + + + Cursor 0..n-1. If singleElement!=null, cursor is 0 until you next(), + which bumps it to 1 meaning no more elements. + + + + Track single elements w/o creating a list. Upon 2nd add, alloc list + + + The list of tokens or subtrees we are tracking + + + Once a node / subtree has been used in a stream, it must be dup'd + from then on. Streams are reset after subrules so that the streams + can be reused in future subrules. So, reset must set a dirty bit. + If dirty, then next() always returns a dup. + + + The element or stream description; usually has name of the token or + rule reference that this list tracks. Can include rulename too, but + the exception would track that info. + + + Create a stream with one element + + + Create a stream, but feed off an existing list + + + + Reset the condition of this stream so that it appears we have + not consumed any of its elements. Elements themselves are untouched. + Once we reset the stream, any future use will need duplicates. Set + the dirty bit. + + + + + Return the next element in the stream. If out of elements, throw + an exception unless size()==1. If size is 1, then return elements[0]. + Return a duplicate node/subtree if stream is out of elements and + size==1. If we've already used the element, dup (dirty bit set). + + + + + Do the work of getting the next element, making sure that it's + a tree node or subtree. Deal with the optimization of single- + element list versus list of size > 1. Throw an exception + if the stream is empty or we're out of elements and size>1. + protected so you can override in a subclass if necessary. + + + + + When constructing trees, sometimes we need to dup a token or AST + subtree. Dup'ing a token means just creating another AST node + around it. For trees, you must call the adaptor.dupTree() unless + the element is for a tree root; then it must be a node dup. + + + + + Ensure stream emits trees; tokens must be converted to AST nodes. + AST nodes can be passed through unmolested. + + + + + Queues up nodes matched on left side of -> in a tree parser. This is + the analog of RewriteRuleTokenStream for normal parsers. + + + + Create a stream with one element + + + Create a stream, but feed off an existing list + + + Create a stream with one element + + + Create a stream, but feed off an existing list + + + + Treat next element as a single node even if it's a subtree. + This is used instead of next() when the result has to be a + tree root node. Also prevents us from duplicating recently-added + children; e.g., ^(type ID)+ adds ID to type and then 2nd iteration + must dup the type node, but ID has been added. + + + + Referencing a rule result twice is ok; dup entire tree as + we can't be adding trees as root; e.g., expr expr. + + Hideous code duplication here with super.next(). Can't think of + a proper way to refactor. This needs to always call dup node + and super.next() doesn't know which to call: dup node or dup tree. + + + + Create a stream with one element + + + Create a stream, but feed off an existing list + + + Get next token from stream and make a node for it + + + + Don't convert to a tree unless they explicitly call nextTree. + This way we can do hetero tree nodes in rewrite. + + + + Return a node stream from a doubly-linked tree whose nodes + know what child index they are. No remove() is supported. + + Emit navigation nodes (DOWN, UP, and EOF) to let show tree structure. + + + If we emit UP/DOWN nodes, we need to spit out multiple nodes per + next() call. + + + + A parser for a stream of tree nodes. "tree grammars" result in a subclass + of this. All the error reporting and recovery is shared with Parser via + the BaseRecognizer superclass. + + + + Set the input stream + + + + Match '.' in tree parser has special meaning. Skip node or + entire tree if node has children. If children, scan until + corresponding UP node. + + + + + We have DOWN/UP nodes in the stream that have no line info; override. + plus we want to alter the exception type. Don't try to recover + from tree parser errors inline... + + + + + Prefix error message with the grammar name because message is + always intended for the programmer because the parser built + the input tree not the user. + + + + + Tree parsers parse nodes they usually have a token object as + payload. Set the exception token and do the default behavior. + + + + The tree pattern to lex like "(A B C)" + + + Index into input string + + + Current char + + + How long is the pattern in char? + + + Set when token type is ID or ARG (name mimics Java's StreamTokenizer) + + + Override this if you need transformation tracing to go somewhere + other than stdout or if you're not using ITree-derived trees. + + + + This is identical to the ParserRuleReturnScope except that + the start property is a tree nodes not Token object + when you are parsing trees. + + + + Gets the first node or root node of tree matched for this rule. + + + Do a depth first walk of a tree, applying pre() and post() actions as we go. + + + + Visit every node in tree t and trigger an action for each node + before/after having visited all of its children. Bottom up walk. + Execute both actions even if t has no children. Ignore return + results from transforming children since they will have altered + the child list of this node (their parent). Return result of + applying post action to this node. + + + + + Build and navigate trees with this object. Must know about the names + of tokens so you have to pass in a map or array of token names (from which + this class can build the map). I.e., Token DECL means nothing unless the + class can translate it to a token type. + + + + In order to create nodes and navigate, this class needs a TreeAdaptor. + + This class can build a token type -> node index for repeated use or for + iterating over the various nodes with a particular type. + + This class works in conjunction with the TreeAdaptor rather than moving + all this functionality into the adaptor. An adaptor helps build and + navigate trees using methods. This class helps you do it with string + patterns like "(A B C)". You can create a tree from that pattern or + match subtrees against it. + + + + + When using %label:TOKENNAME in a tree for parse(), we must + track the label. + + + + This adaptor creates TreePattern objects for use during scan() + + + + Compute a Map<String, Integer> that is an inverted index of + tokenNames (which maps int token types to names). + + + + Using the map of token names to token types, return the type. + + + + Walk the entire tree and make a node name to nodes mapping. + For now, use recursion but later nonrecursive version may be + more efficient. Returns Map<Integer, List> where the List is + of your AST node type. The Integer is the token type of the node. + + + + TODO: save this index so that find and visit are faster + + + + Do the work for index + + + Return a List of tree nodes with token type ttype + + + Return a List of subtrees matching pattern. + + + + Visit every ttype node in t, invoking the visitor. This is a quicker + version of the general visit(t, pattern) method. The labels arg + of the visitor action method is never set (it's null) since using + a token type rather than a pattern doesn't let us set a label. + + + + Do the recursive work for visit + + + + For all subtrees that match the pattern, execute the visit action. + The implementation uses the root node of the pattern in combination + with visit(t, ttype, visitor) so nil-rooted patterns are not allowed. + Patterns with wildcard roots are also not allowed. + + + + + Given a pattern like (ASSIGN %lhs:ID %rhs:.) with optional labels + on the various nodes and '.' (dot) as the node/subtree wildcard, + return true if the pattern matches and fill the labels Map with + the labels pointing at the appropriate nodes. Return false if + the pattern is malformed or the tree does not match. + + + + If a node specifies a text arg in pattern, then that must match + for that node in t. + + TODO: what's a better way to indicate bad pattern? Exceptions are a hassle + + + + + Do the work for parse. Check to see if the t2 pattern fits the + structure and token types in t1. Check text if the pattern has + text arguments on nodes. Fill labels map with pointers to nodes + in tree matched against nodes in pattern with labels. + + + + + Create a tree or node from the indicated tree pattern that closely + follows ANTLR tree grammar tree element syntax: + + (root child1 ... child2). + + + + You can also just pass in a node: ID + + Any node can have a text argument: ID[foo] + (notice there are no quotes around foo--it's clear it's a string). + + nil is a special name meaning "give me a nil node". Useful for + making lists: (nil A B C) is a list of A B C. + + + + + Compare t1 and t2; return true if token types/text, structure match exactly. + The trees are examined in their entirety so that (A B) does not match + (A B C) nor (A (B C)). + + + + TODO: allow them to pass in a comparator + TODO: have a version that is nonstatic so it can use instance adaptor + + I cannot rely on the tree node's equals() implementation as I make + no constraints at all on the node types nor interface etc... + + + + + Compare type, structure, and text of two trees, assuming adaptor in + this instance of a TreeWizard. + + + + A token stream that pulls tokens from the code source on-demand and + without tracking a complete buffer of the tokens. This stream buffers + the minimum number of tokens possible. It's the same as + OnDemandTokenStream except that OnDemandTokenStream buffers all tokens. + + You can't use this stream if you pass whitespace or other off-channel + tokens to the parser. The stream can't ignore off-channel tokens. + + You can only look backwards 1 token: LT(-1). + + Use this when you need to read from a socket or other infinite stream. + + @see BufferedTokenStream + @see CommonTokenStream + + + Skip tokens on any channel but this one; this is how we skip whitespace... + + + An extra token while parsing a TokenStream + + + diff --git a/nhibernateg7/packages/Antlr3.Runtime.3.5.1/lib/netstandard1.1/Antlr3.Runtime.dll b/nhibernateg7/packages/Antlr3.Runtime.3.5.1/lib/netstandard1.1/Antlr3.Runtime.dll new file mode 100644 index 0000000..1bab12e Binary files /dev/null and b/nhibernateg7/packages/Antlr3.Runtime.3.5.1/lib/netstandard1.1/Antlr3.Runtime.dll differ diff --git a/nhibernateg7/packages/Antlr3.Runtime.3.5.1/lib/netstandard1.1/Antlr3.Runtime.xml b/nhibernateg7/packages/Antlr3.Runtime.3.5.1/lib/netstandard1.1/Antlr3.Runtime.xml new file mode 100644 index 0000000..31d731f --- /dev/null +++ b/nhibernateg7/packages/Antlr3.Runtime.3.5.1/lib/netstandard1.1/Antlr3.Runtime.xml @@ -0,0 +1,3220 @@ + + + + Antlr3.Runtime + + + + + A kind of ReaderStream that pulls from an InputStream. + Useful for reading from stdin and specifying file encodings etc... + + + + + Vacuum all input from a Reader and then treat it like a StringStream. + Manage the buffer manually to avoid unnecessary data copying. + + + + If you need encoding, use ANTLRInputStream. + + + + + A pretty quick CharStream that pulls all data from an array + directly. Every method call counts in the lexer. Java's + strings aren't very good so I'm avoiding. + + + + The data being scanned + + + How many characters are actually in the buffer + + + 0..n-1 index into string of next char + + + line number 1..n within the input + + + The index of the character relative to the beginning of the line 0..n-1 + + + tracks how deep mark() calls are nested + + + + A list of CharStreamState objects that tracks the stream state + values line, charPositionInLine, and p that can change as you + move through the input stream. Indexed from 1..markDepth. + A null is kept @ index 0. Create upon first call to mark(). + + + + Track the last mark() call result value for use in rewind(). + + + What is name or source of this char stream? + + + Copy data in string to a local char array + + + This is the preferred constructor as no data is copied + + + + Return the current input symbol index 0..n where n indicates the + last symbol has been read. The index is the index of char to + be returned from LA(1). + + + + + Reset the stream so that it's in the same state it was + when the object was created *except* the data array is not + touched. + + + + + consume() ahead until p==index; can't just set p=index as we must + update line and charPositionInLine. + + + + + A generic recognizer that can handle recognizers generated from + lexer, parser, and tree grammars. This is all the parsing + support code essentially; most of it is error recovery stuff and + backtracking. + + + + + State of a lexer, parser, or tree parser are collected into a state + object so the state can be shared. This sharing is needed to + have one grammar import others and share same error variables + and other state variables. It's a kind of explicit multiple + inheritance via delegation of methods and shared state. + + + + reset the parser's state; subclasses must rewinds the input stream + + + + Match current input symbol against ttype. Attempt + single token insertion or deletion error recovery. If + that fails, throw MismatchedTokenException. + + + + To turn off single token insertion or deletion error + recovery, override recoverFromMismatchedToken() and have it + throw an exception. See TreeParser.recoverFromMismatchedToken(). + This way any error in a rule will cause an exception and + immediate exit from rule. Rule would recover by resynchronizing + to the set of symbols that can follow rule ref. + + + + Match the wildcard: in a symbol + + + Report a recognition problem. + + + This method sets errorRecovery to indicate the parser is recovering + not parsing. Once in recovery mode, no errors are generated. + To get out of recovery mode, the parser must successfully match + a token (after a resync). So it will go: + + 1. error occurs + 2. enter recovery mode, report error + 3. consume until token found in resynch set + 4. try to resume parsing + 5. next match() will reset errorRecovery mode + + If you override, make sure to update syntaxErrors if you care about that. + + + + What error message should be generated for the various exception types? + + + Not very object-oriented code, but I like having all error message + generation within one method rather than spread among all of the + exception classes. This also makes it much easier for the exception + handling because the exception classes do not have to have pointers back + to this object to access utility routines and so on. Also, changing + the message for an exception type would be difficult because you + would have to subclassing exception, but then somehow get ANTLR + to make those kinds of exception objects instead of the default. + This looks weird, but trust me--it makes the most sense in terms + of flexibility. + + For grammar debugging, you will want to override this to add + more information such as the stack frame with + getRuleInvocationStack(e, this.getClass().getName()) and, + for no viable alts, the decision description and state etc... + + Override this to change the message generated for one or more + exception types. + + + + + Get number of recognition errors (lexer, parser, tree parser). Each + recognizer tracks its own number. So parser and lexer each have + separate count. Does not count the spurious errors found between + an error and next valid token match + + + + + + What is the error header, normally line/character position information? + + + + How should a token be displayed in an error message? The default + is to display just the text, but during development you might + want to have a lot of information spit out. Override in that case + to use t.ToString() (which, for CommonToken, dumps everything about + the token). This is better than forcing you to override a method in + your token objects because you don't have to go modify your lexer + so that it creates a new Java type. + + + + Override this method to change where error messages go + + + + Recover from an error found on the input stream. This is + for NoViableAlt and mismatched symbol exceptions. If you enable + single token insertion and deletion, this will usually not + handle mismatched symbol exceptions but there could be a mismatched + token that the match() routine could not recover from. + + + + + A hook to listen in on the token consumption during error recovery. + The DebugParser subclasses this to fire events to the listenter. + + + + + Compute the context-sensitive FOLLOW set for current rule. + This is set of token types that can follow a specific rule + reference given a specific call chain. You get the set of + viable tokens that can possibly come next (lookahead depth 1) + given the current call chain. Contrast this with the + definition of plain FOLLOW for rule r: + + + FOLLOW(r)={x | S=>*alpha r beta in G and x in FIRST(beta)} + + where x in T* and alpha, beta in V*; T is set of terminals and + V is the set of terminals and nonterminals. In other words, + FOLLOW(r) is the set of all tokens that can possibly follow + references to r in *any* sentential form (context). At + runtime, however, we know precisely which context applies as + we have the call chain. We may compute the exact (rather + than covering superset) set of following tokens. + + For example, consider grammar: + + stat : ID '=' expr ';' // FOLLOW(stat)=={EOF} + | "return" expr '.' + ; + expr : atom ('+' atom)* ; // FOLLOW(expr)=={';','.',')'} + atom : INT // FOLLOW(atom)=={'+',')',';','.'} + | '(' expr ')' + ; + + The FOLLOW sets are all inclusive whereas context-sensitive + FOLLOW sets are precisely what could follow a rule reference. + For input input "i=(3);", here is the derivation: + + stat => ID '=' expr ';' + => ID '=' atom ('+' atom)* ';' + => ID '=' '(' expr ')' ('+' atom)* ';' + => ID '=' '(' atom ')' ('+' atom)* ';' + => ID '=' '(' INT ')' ('+' atom)* ';' + => ID '=' '(' INT ')' ';' + + At the "3" token, you'd have a call chain of + + stat -> expr -> atom -> expr -> atom + + What can follow that specific nested ref to atom? Exactly ')' + as you can see by looking at the derivation of this specific + input. Contrast this with the FOLLOW(atom)={'+',')',';','.'}. + + You want the exact viable token set when recovering from a + token mismatch. Upon token mismatch, if LA(1) is member of + the viable next token set, then you know there is most likely + a missing token in the input stream. "Insert" one by just not + throwing an exception. + + + Attempt to recover from a single missing or extra token. + + EXTRA TOKEN + + LA(1) is not what we are looking for. If LA(2) has the right token, + however, then assume LA(1) is some extra spurious token. Delete it + and LA(2) as if we were doing a normal match(), which advances the + input. + + MISSING TOKEN + + If current token is consistent with what could come after + ttype then it is ok to "insert" the missing token, else throw + exception For example, Input "i=(3;" is clearly missing the + ')'. When the parser returns from the nested call to expr, it + will have call chain: + + stat -> expr -> atom + + and it will be trying to match the ')' at this point in the + derivation: + + => ID '=' '(' INT ')' ('+' atom)* ';' + ^ + match() will see that ';' doesn't match ')' and report a + mismatched token error. To recover, it sees that LA(1)==';' + is in the set of tokens that can follow the ')' token + reference in rule atom. It can assume that you forgot the ')'. + + + Not currently used + + + + Match needs to return the current input symbol, which gets put + into the label for the associated token ref; e.g., x=ID. Token + and tree parsers need to return different objects. Rather than test + for input stream type or change the IntStream interface, I use + a simple method to ask the recognizer to tell me what the current + input symbol is. + + + This is ignored for lexers. + + + Conjure up a missing token during error recovery. + + + The recognizer attempts to recover from single missing + symbols. But, actions might refer to that missing symbol. + For example, x=ID {f($x);}. The action clearly assumes + that there has been an identifier matched previously and that + $x points at that token. If that token is missing, but + the next token in the stream is what we want we assume that + this token is missing and we keep going. Because we + have to return some token to replace the missing token, + we have to conjure one up. This method gives the user control + over the tokens returned for missing tokens. Mostly, + you will want to create something special for identifier + tokens. For literals such as '{' and ',', the default + action in the parser or tree parser works. It simply creates + a CommonToken of the appropriate type. The text will be the token. + If you change what tokens must be created by the lexer, + override this method to create the appropriate tokens. + + + + Consume tokens until one matches the given token set + + + Push a rule's follow set using our own hardcoded stack + + + Return whether or not a backtracking attempt failed. + + + + Used to print out token names like ID during debugging and + error reporting. The generated parsers implement a method + that overrides this to point to their String[] tokenNames. + + + + + For debugging and other purposes, might want the grammar name. + Have ANTLR generate an implementation for this method. + + + + + A convenience method for use most often with template rewrites. + Convert a list of to a list of . + + + + + Given a rule number and a start token index number, return + MEMO_RULE_UNKNOWN if the rule has not parsed input starting from + start index. If this rule has parsed input starting from the + start index before, then return where the rule stopped parsing. + It returns the index of the last token matched by the rule. + + + + For now we use a hashtable and just the slow Object-based one. + Later, we can make a special one for ints and also one that + tosses out data after we commit past input position i. + + + + + Has this rule already parsed input at the current index in the + input stream? Return the stop token index or MEMO_RULE_UNKNOWN. + If we attempted but failed to parse properly before, return + MEMO_RULE_FAILED. + + + + This method has a side-effect: if we have seen this input for + this rule and successfully parsed before, then seek ahead to + 1 past the stop token matched for this rule last time. + + + + + Record whether or not this rule parsed the input at this position + successfully. Use a standard java hashtable for now. + + + + return how many rule/input-index pairs there are in total. + TODO: this includes synpreds. :( + + + + A stripped-down version of org.antlr.misc.BitSet that is just + good enough to handle runtime requirements such as FOLLOW sets + for automatic error recovery. + + + + + We will often need to do a mod operator (i mod nbits). Its + turns out that, for powers of two, this mod operation is + same as (i & (nbits-1)). Since mod is slow, we use a + precomputed mod mask to do the mod instead. + + + + The actual data bits + + + Construct a bitset of size one word (64 bits) + + + Construction from a static array of longs + + + Construction from a list of integers + + + Construct a bitset given the size + The size of the bitset in bits + + + return this | a in a new set + + + or this element into this set (grow as necessary to accommodate) + + + Grows the set to a larger number of bits. + element that must fit in set + + + Sets the size of a set. + how many words the new set should be + + + return how much space is being used by the bits array not how many actually have member bits on. + + + Is this contained within a? + + + Buffer all input tokens but do on-demand fetching of new tokens from + lexer. Useful when the parser or lexer has to set context/mode info before + proper lexing of future tokens. The ST template parser needs this, + for example, because it has to constantly flip back and forth between + inside/output templates. E.g., <names:{hi, <it>}> has to parse names + as part of an expression but "hi, <it>" as a nested template. + + You can't use this stream if you pass whitespace or other off-channel + tokens to the parser. The stream can't ignore off-channel tokens. + (UnbufferedTokenStream is the same way.) + + This is not a subclass of UnbufferedTokenStream because I don't want + to confuse small moving window of tokens it uses for the full buffer. + + + Record every single token pulled from the source so we can reproduce + chunks of it later. The buffer in LookaheadStream overlaps sometimes + as its moving window moves through the input. This list captures + everything so we can access complete input text. + + + Track the last mark() call result value for use in rewind(). + + + The index into the tokens list of the current token (next token + to consume). tokens[p] should be LT(1). p=-1 indicates need + to initialize with first token. The ctor doesn't get a token. + First call to LT(1) or whatever gets the first token and sets p=0; + + + + How deep have we gone? + + + + Move the input pointer to the next incoming token. The stream + must become active with LT(1) available. consume() simply + moves the input pointer so that LT(1) points at the next + input symbol. Consume at least one token. + + Walk past any token not on the channel the parser is listening to. + + + Make sure index i in tokens has a token. + + + add n elements to buffer + + + Given a start and stop index, return a List of all tokens in + the token type BitSet. Return null if no tokens were found. This + method looks at both on and off channel tokens. + + + + When walking ahead with cyclic DFA or for syntactic predicates, + we need to record the state of the input stream (char index, + line, etc...) so that we can rewind the state after scanning ahead. + + + This is the complete state of a stream. + + + Index into the char stream of next lookahead char + + + What line number is the scanner at before processing buffer[p]? + + + What char position 0..n-1 in line is scanner before processing buffer[p]? + + + + A Token object like we'd use in ANTLR 2.x; has an actual string created + and associated with this object. These objects are needed for imaginary + tree nodes that have payload objects. We need to create a Token object + that has a string; the tree node will point at this token. CommonToken + has indexes into a char stream and hence cannot be used to introduce + new strings. + + + + What token number is this from 0..n-1 tokens + + + + We need to be able to change the text once in a while. If + this is non-null, then getText should return this. Note that + start/stop are not affected by changing this. + + + + What token number is this from 0..n-1 tokens; < 0 implies invalid index + + + The char position into the input buffer where this token starts + + + The char position into the input buffer where this token stops + + + + The most common stream of tokens is one where every token is buffered up + and tokens are prefiltered for a certain channel (the parser will only + see these tokens and cannot change the filter channel number during the + parse). + + + TODO: how to access the full token stream? How to track all tokens matched per rule? + + + Skip tokens on any channel but this one; this is how we skip whitespace... + + + Reset this token stream by setting its token source. + + + Always leave p on an on-channel token. + + + Given a starting index, return the index of the first on-channel + token. + + + All debugging events that a recognizer can trigger. + + + I did not create a separate AST debugging interface as it would create + lots of extra classes and DebugParser has a dbg var defined, which makes + it hard to change to ASTDebugEventListener. I looked hard at this issue + and it is easier to understand as one monolithic event interface for all + possible events. Hopefully, adding ST debugging stuff won't be bad. Leave + for future. 4/26/2006. + + + + + The parser has just entered a rule. No decision has been made about + which alt is predicted. This is fired AFTER init actions have been + executed. Attributes are defined and available etc... + The grammarFileName allows composite grammars to jump around among + multiple grammar files. + + + + + Because rules can have lots of alternatives, it is very useful to + know which alt you are entering. This is 1..n for n alts. + + + + + This is the last thing executed before leaving a rule. It is + executed even if an exception is thrown. This is triggered after + error reporting and recovery have occurred (unless the exception is + not caught in this rule). This implies an "exitAlt" event. + The grammarFileName allows composite grammars to jump around among + multiple grammar files. + + + + Track entry into any (...) subrule other EBNF construct + + + + Every decision, fixed k or arbitrary, has an enter/exit event + so that a GUI can easily track what LT/consume events are + associated with prediction. You will see a single enter/exit + subrule but multiple enter/exit decision events, one for each + loop iteration. + + + + + An input token was consumed; matched by any kind of element. + Trigger after the token was matched by things like match(), matchAny(). + + + + + An off-channel input token was consumed. + Trigger after the token was matched by things like match(), matchAny(). + (unless of course the hidden token is first stuff in the input stream). + + + + + Somebody (anybody) looked ahead. Note that this actually gets + triggered by both LA and LT calls. The debugger will want to know + which Token object was examined. Like consumeToken, this indicates + what token was seen at that depth. A remote debugger cannot look + ahead into a file it doesn't have so LT events must pass the token + even if the info is redundant. + + + + + The parser is going to look arbitrarily ahead; mark this location, + the token stream's marker is sent in case you need it. + + + + + After an arbitrairly long lookahead as with a cyclic DFA (or with + any backtrack), this informs the debugger that stream should be + rewound to the position associated with marker. + + + + + Rewind to the input position of the last marker. + Used currently only after a cyclic DFA and just + before starting a sem/syn predicate to get the + input position back to the start of the decision. + Do not "pop" the marker off the state. mark(i) + and rewind(i) should balance still. + + + + + To watch a parser move through the grammar, the parser needs to + inform the debugger what line/charPos it is passing in the grammar. + For now, this does not know how to switch from one grammar to the + other and back for island grammars etc... + + + + This should also allow breakpoints because the debugger can stop + the parser whenever it hits this line/pos. + + + + + A recognition exception occurred such as NoViableAltException. I made + this a generic event so that I can alter the exception hierachy later + without having to alter all the debug objects. + + + + Upon error, the stack of enter rule/subrule must be properly unwound. + If no viable alt occurs it is within an enter/exit decision, which + also must be rewound. Even the rewind for each mark must be unwount. + In the Java target this is pretty easy using try/finally, if a bit + ugly in the generated code. The rewind is generated in DFA.predict() + actually so no code needs to be generated for that. For languages + w/o this "finally" feature (C++?), the target implementor will have + to build an event stack or something. + + Across a socket for remote debugging, only the RecognitionException + data fields are transmitted. The token object or whatever that + caused the problem was the last object referenced by LT. The + immediately preceding LT event should hold the unexpected Token or + char. + + Here is a sample event trace for grammar: + + b : C ({;}A|B) // {;} is there to prevent A|B becoming a set + | D + ; + + The sequence for this rule (with no viable alt in the subrule) for + input 'c c' (there are 3 tokens) is: + + commence + LT(1) + enterRule b + location 7 1 + enter decision 3 + LT(1) + exit decision 3 + enterAlt1 + location 7 5 + LT(1) + consumeToken [c/<4>,1:0] + location 7 7 + enterSubRule 2 + enter decision 2 + LT(1) + LT(1) + recognitionException NoViableAltException 2 1 2 + exit decision 2 + exitSubRule 2 + beginResync + LT(1) + consumeToken [c/<4>,1:1] + LT(1) + endResync + LT(-1) + exitRule b + terminate + + + + + Indicates the recognizer is about to consume tokens to resynchronize + the parser. Any consume events from here until the recovered event + are not part of the parse--they are dead tokens. + + + + + Indicates that the recognizer has finished consuming tokens in order + to resychronize. There may be multiple beginResync/endResync pairs + before the recognizer comes out of errorRecovery mode (in which + multiple errors are suppressed). This will be useful + in a gui where you want to probably grey out tokens that are consumed + but not matched to anything in grammar. Anything between + a beginResync/endResync pair was tossed out by the parser. + + + + A semantic predicate was evaluate with this result and action text + + + + Announce that parsing has begun. Not technically useful except for + sending events over a socket. A GUI for example will launch a thread + to connect and communicate with a remote parser. The thread will want + to notify the GUI when a connection is made. ANTLR parsers + trigger this upon entry to the first rule (the ruleLevel is used to + figure this out). + + + + + Parsing is over; successfully or not. Mostly useful for telling + remote debugging listeners that it's time to quit. When the rule + invocation level goes to zero at the end of a rule, we are done + parsing. + + + + + Input for a tree parser is an AST, but we know nothing for sure + about a node except its type and text (obtained from the adaptor). + This is the analog of the consumeToken method. Again, the ID is + the hashCode usually of the node so it only works if hashCode is + not implemented. If the type is UP or DOWN, then + the ID is not really meaningful as it's fixed--there is + just one UP node and one DOWN navigation node. + + + + + + + The tree parser lookedahead. If the type is UP or DOWN, + then the ID is not really meaningful as it's fixed--there is + just one UP node and one DOWN navigation node. + + + + + A nil was created (even nil nodes have a unique ID... + they are not "null" per se). As of 4/28/2006, this + seems to be uniquely triggered when starting a new subtree + such as when entering a subrule in automatic mode and when + building a tree in rewrite mode. + + + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only t.ID is set. + + + + + Upon syntax error, recognizers bracket the error with an error node + if they are building ASTs. + + + + + + Announce a new node built from token elements such as type etc... + + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only t.ID, type, text are + set. + + + + Announce a new node built from an existing token. + + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only node.ID and token.tokenIndex + are set. + + + + Make a node the new root of an existing root. See + + + Note: the newRootID parameter is possibly different + than the TreeAdaptor.becomeRoot() newRoot parameter. + In our case, it will always be the result of calling + TreeAdaptor.becomeRoot() and not root_n or whatever. + + The listener should assume that this event occurs + only when the current subrule (or rule) subtree is + being reset to newRootID. + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only IDs are set. + + + + + + Make childID a child of rootID. + + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only IDs are set. + + + + + + Set the token start/stop token index for a subtree root or node. + + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only t.ID is set. + + + + A DFA implemented as a set of transition tables. + + + Any state that has a semantic predicate edge is special; those states + are generated with if-then-else structures in a specialStateTransition() + which is generated by cyclicDFA template. + + There are at most 32767 states (16-bit signed short). + Could get away with byte sometimes but would have to generate different + types and the simulation code too. For a point of reference, the Java + lexer's Tokens rule DFA has 326 states roughly. + + + + Which recognizer encloses this DFA? Needed to check backtracking + + + + From the input stream, predict what alternative will succeed + using this DFA (representing the covering regular approximation + to the underlying CFL). Return an alternative number 1..n. Throw + an exception upon error. + + + + A hook for debugging interface + + + + Given a String that has a run-length-encoding of some unsigned shorts + like "\1\2\3\9", convert to short[] {2,9,9,9}. We do this to avoid + static short[] which generates so much init code that the class won't + compile. :( + + + + Hideous duplication of code, but I need different typed arrays out :( + + + The recognizer did not match anything for a (..)+ loop. + + + + A semantic predicate failed during validation. Validation of predicates + occurs when normally parsing the alternative just like matching a token. + Disambiguating predicate evaluation occurs when we hoist a predicate into + a prediction decision. + + + + AST rules have trees + + + Has a value potentially if output=AST; + + + AST rules have trees + + + Has a value potentially if output=AST; + + + A source of characters for an ANTLR lexer + + + + For infinite streams, you don't need this; primarily I'm providing + a useful interface for action code. Just make sure actions don't + use this on streams that don't support it. + + + + + Get the ith character of lookahead. This is the same usually as + LA(i). This will be used for labels in the generated + lexer code. I'd prefer to return a char here type-wise, but it's + probably better to be 32-bit clean and be consistent with LA. + + + + ANTLR tracks the line information automatically + Because this stream can rewind, we need to be able to reset the line + + + The index of the character relative to the beginning of the line 0..n-1 + + + + A simple stream of integers used when all I care about is the char + or token type sequence (such as interpretation). + + + + + Get int at current input pointer + i ahead where i=1 is next int. + Negative indexes are allowed. LA(-1) is previous token (token + just matched). LA(-i) where i is before first token should + yield -1, invalid char / EOF. + + + + + Tell the stream to start buffering if it hasn't already. Return + current input position, Index, or some other marker so that + when passed to rewind() you get back to the same spot. + rewind(mark()) should not affect the input cursor. The Lexer + track line/col info as well as input index so its markers are + not pure input indexes. Same for tree node streams. + + + + + Return the current input symbol index 0..n where n indicates the + last symbol has been read. The index is the symbol about to be + read not the most recently read symbol. + + + + + Reset the stream so that next call to index would return marker. + The marker will usually be Index but it doesn't have to be. It's + just a marker to indicate what state the stream was in. This is + essentially calling release() and seek(). If there are markers + created after this marker argument, this routine must unroll them + like a stack. Assume the state the stream was in when this marker + was created. + + + + + Rewind to the input position of the last marker. + Used currently only after a cyclic DFA and just + before starting a sem/syn predicate to get the + input position back to the start of the decision. + Do not "pop" the marker off the state. mark(i) + and rewind(i) should balance still. It is + like invoking rewind(last marker) but it should not "pop" + the marker off. It's like seek(last marker's input position). + + + + + You may want to commit to a backtrack but don't want to force the + stream to keep bookkeeping objects around for a marker that is + no longer necessary. This will have the same behavior as + rewind() except it releases resources without the backward seek. + This must throw away resources for all markers back to the marker + argument. So if you're nested 5 levels of mark(), and then release(2) + you have to release resources for depths 2..5. + + + + + Set the input cursor to the position indicated by index. This is + normally used to seek ahead in the input stream. No buffering is + required to do this unless you know your stream will use seek to + move backwards such as when backtracking. + + + + This is different from rewind in its multi-directional + requirement and in that its argument is strictly an input cursor (index). + + For char streams, seeking forward must update the stream state such + as line number. For seeking backwards, you will be presumably + backtracking using the mark/rewind mechanism that restores state and + so this method does not need to update state when seeking backwards. + + Currently, this method is only used for efficient backtracking using + memoization, but in the future it may be used for incremental parsing. + + The index is 0..n-1. A seek to position i means that LA(1) will + return the ith symbol. So, seeking to 0 means LA(1) will return the + first element in the stream. + + + + + Only makes sense for streams that buffer everything up probably, but + might be useful to display the entire stream or for testing. This + value includes a single EOF. + + + + + Where are you getting symbols from? Normally, implementations will + pass the buck all the way to the lexer who can ask its input stream + for the file name or whatever. + + + + + Rules can have start/stop info. + + + + + Gets the start element from the input stream + + + + + Gets the stop element from the input stream + + + + + Rules can have start/stop info. + + The element type of the input stream. + + + + Gets the start element from the input stream + + + + + Gets the stop element from the input stream + + + + Get the text of the token + + + The line number on which this token was matched; line=1..n + + + The index of the first character relative to the beginning of the line 0..n-1 + + + + An index from 0..n-1 of the token object in the input stream. + This must be valid in order to use the ANTLRWorks debugger. + + + + + From what character stream was this token created? You don't have to + implement but it's nice to know where a Token comes from if you have + include files etc... on the input. + + + + + A source of tokens must provide a sequence of tokens via nextToken() + and also must reveal it's source of characters; CommonToken's text is + computed from a CharStream; it only store indices into the char stream. + + + + Errors from the lexer are never passed to the parser. Either you want + to keep going or you do not upon token recognition error. If you do not + want to continue lexing then you do not want to continue parsing. Just + throw an exception not under RecognitionException and Java will naturally + toss you all the way out of the recognizers. If you want to continue + lexing then you should not throw an exception to the parser--it has already + requested a token. Keep lexing until you get a valid one. Just report + errors and keep going, looking for a valid token. + + + + + Return a Token object from your input stream (usually a CharStream). + Do not fail/return upon lexing error; keep chewing on the characters + until you get a good one; errors are not passed through to the parser. + + + + + Where are you getting tokens from? normally the implication will simply + ask lexers input stream. + + + + A stream of tokens accessing tokens from a TokenSource + + + Get Token at current input pointer + i ahead where i=1 is next Token. + i<0 indicates tokens in the past. So -1 is previous token and -2 is + two tokens ago. LT(0) is undefined. For i>=n, return Token.EOFToken. + Return null for LT(0) and any index that results in an absolute address + that is negative. + + + + How far ahead has the stream been asked to look? The return + value is a valid index from 0..n-1. + + + + + Get a token at an absolute index i; 0..n-1. This is really only + needed for profiling and debugging and token stream rewriting. + If you don't want to buffer up tokens, then this method makes no + sense for you. Naturally you can't use the rewrite stream feature. + I believe DebugTokenStream can easily be altered to not use + this method, removing the dependency. + + + + + Where is this stream pulling tokens from? This is not the name, but + the object that provides Token objects. + + + + + Return the text of all tokens from start to stop, inclusive. + If the stream does not buffer all the tokens then it can just + return "" or null; Users should not access $ruleLabel.text in + an action of course in that case. + + + + + Because the user is not required to use a token with an index stored + in it, we must provide a means for two token objects themselves to + indicate the start/end location. Most often this will just delegate + to the other toString(int,int). This is also parallel with + the TreeNodeStream.toString(Object,Object). + + + + + The most common stream of tokens is one where every token is buffered up + and tokens are prefiltered for a certain channel (the parser will only + see these tokens and cannot change the filter channel number during the + parse). + + + TODO: how to access the full token stream? How to track all tokens matched per rule? + + + + Record every single token pulled from the source so we can reproduce + chunks of it later. + + + + Map from token type to channel to override some Tokens' channel numbers + + + Set of token types; discard any tokens with this type + + + Skip tokens on any channel but this one; this is how we skip whitespace... + + + By default, track all incoming tokens + + + Track the last mark() call result value for use in rewind(). + + + + The index into the tokens list of the current token (next token + to consume). p==-1 indicates that the tokens list is empty + + + + + How deep have we gone? + + + + Reset this token stream by setting its token source. + + + + Load all tokens from the token source and put in tokens. + This is done upon first LT request because you might want to + set some token type / channel overrides before filling buffer. + + + + + Move the input pointer to the next incoming token. The stream + must become active with LT(1) available. consume() simply + moves the input pointer so that LT(1) points at the next + input symbol. Consume at least one token. + + + + Walk past any token not on the channel the parser is listening to. + + + + Given a starting index, return the index of the first on-channel token. + + + + A simple filter mechanism whereby you can tell this token stream + to force all tokens of type ttype to be on channel. For example, + when interpreting, we cannot exec actions so we need to tell + the stream to force all WS and NEWLINE to be a different, ignored + channel. + + + + + Given a start and stop index, return a List of all tokens in + the token type BitSet. Return null if no tokens were found. This + method looks at both on and off channel tokens. + + + + + Get the ith token from the current position 1..n where k=1 is the + first symbol of lookahead. + + + + Look backwards k tokens on-channel tokens + + + + Return absolute token i; ignore which channel the tokens are on; + that is, count all tokens not just on-channel tokens. + + + + + A lexer is recognizer that draws input symbols from a character stream. + lexer grammars result in a subclass of this object. A Lexer object + uses simplified match() and error recovery mechanisms in the interest + of speed. + + + + Where is the lexer drawing characters from? + + + + Gets or sets the text matched so far for the current token or any text override. + + + Setting this value replaces any previously set value, and overrides the original text. + + + + Return a token from this source; i.e., match a token on the char stream. + + + Returns the EOF token (default), if you need + to return a custom token instead override this method. + + + + Instruct the lexer to skip creating a token for current lexer rule + and look for another token. nextToken() knows to keep looking when + a lexer rule finishes with token set to SKIP_TOKEN. Recall that + if token==null at end of any token rule, it creates one for you + and emits it. + + + + This is the lexer entry point that sets instance var 'token' + + + + Currently does not support multiple emits per nextToken invocation + for efficiency reasons. Subclass and override this method and + nextToken (to push tokens into a list and pull from that list rather + than a single variable as this implementation does). + + + + + The standard method called to automatically emit a token at the + outermost lexical rule. The token object should point into the + char buffer start..stop. If there is a text override in 'text', + use that to set the token's text. Override this method to emit + custom Token objects. + + + + If you are building trees, then you should also override + Parser or TreeParser.getMissingSymbol(). + + + + What is the index of the current character of lookahead? + + + + Lexers can normally match any char in it's vocabulary after matching + a token, so do the easy thing and just kill a character and hope + it all works out. You can instead use the rule invocation stack + to do sophisticated error recovery if you are in a fragment rule. + + + + A queue that can dequeue and get(i) in O(1) and grow arbitrarily large. + A linked list is fast at dequeue but slow at get(i). An array is + the reverse. This is O(1) for both operations. + + List grows until you dequeue last element at end of buffer. Then + it resets to start filling at 0 again. If adds/removes are balanced, the + buffer will not grow too large. + + No iterator stuff as that's not how we'll use it. + + + dynamically-sized buffer of elements + + + index of next element to fill + + + + How deep have we gone? + + + + + Return element {@code i} elements ahead of current element. {@code i==0} + gets current element. This is not an absolute index into {@link #data} + since {@code p} defines the start of the real list. + + + + Get and remove first element in queue + + + Return string of current buffer contents; non-destructive + + + + A lookahead queue that knows how to mark/release locations in the buffer for + backtracking purposes. Any markers force the {@link FastQueue} superclass to + keep all elements until no more markers; then can reset to avoid growing a + huge buffer. + + + + Absolute token index. It's the index of the symbol about to be + read via {@code LT(1)}. Goes from 0 to numtokens. + + + This is the {@code LT(-1)} element for the first element in {@link #data}. + + + Track object returned by nextElement upon end of stream; + Return it later when they ask for LT passed end of input. + + + Track the last mark() call result value for use in rewind(). + + + tracks how deep mark() calls are nested + + + + Implement nextElement to supply a stream of elements to this + lookahead buffer. Return EOF upon end of the stream we're pulling from. + + + + + Get and remove first element in queue; override + {@link FastQueue#remove()}; it's the same, just checks for backtracking. + + + + Make sure we have at least one element to remove, even if EOF + + + + Make sure we have 'need' elements from current position p. Last valid + p index is data.size()-1. p+need-1 is the data index 'need' elements + ahead. If we need 1 element, (p+1-1)==p must be < data.size(). + + + + add n elements to buffer + + + Size of entire stream is unknown; we only know buffer size from FastQueue + + + + Seek to a 0-indexed absolute token index. Normally used to seek backwards + in the buffer. Does not force loading of nodes. + + + To preserve backward compatibility, this method allows seeking past the + end of the currently buffered data. In this case, the input pointer will + be moved but the data will only actually be loaded upon the next call to + {@link #consume} or {@link #LT} for {@code k>0}. + + + + A mismatched char or Token or tree node + + + + We were expecting a token but it's not found. The current token + is actually what we wanted next. Used for tree node errors too. + + + + + A parser for TokenStreams. "parser grammars" result in a subclass + of this. + + + + Gets or sets the token stream; resets the parser upon a set. + + + + Rules that return more than a single value must return an object + containing all the values. Besides the properties defined in + RuleLabelScope.predefinedRulePropertiesScope there may be user-defined + return values. This class simply defines the minimum properties that + are always defined and methods to access the others that might be + available depending on output option such as template and tree. + + + + Note text is not an actual property of the return value, it is computed + from start and stop using the input stream's toString() method. I + could add a ctor to this so that we can pass in and store the input + stream, but I'm not sure we want to do that. It would seem to be undefined + to get the .text property anyway if the rule matches tokens from multiple + input streams. + + I do not use getters for fields of objects that are used simply to + group values such as this aggregate. The getters/setters are there to + satisfy the superclass interface. + + + + The root of the ANTLR exception hierarchy. + + + To avoid English-only error messages and to generally make things + as flexible as possible, these exceptions are not created with strings, + but rather the information necessary to generate an error. Then + the various reporting methods in Parser and Lexer can be overridden + to generate a localized error message. For example, MismatchedToken + exceptions are built with the expected token type. + So, don't expect getMessage() to return anything. + + Note that as of Java 1.4, you can access the stack trace, which means + that you can compute the complete trace of rules from the start symbol. + This gives you considerable context information with which to generate + useful error messages. + + ANTLR generates code that throws exceptions upon recognition error and + also generates code to catch these exceptions in each rule. If you + want to quit upon first error, you can turn off the automatic error + handling mechanism using rulecatch action, but you still need to + override methods mismatch and recoverFromMismatchSet. + + In general, the recognition exceptions can track where in a grammar a + problem occurred and/or what was the expected input. While the parser + knows its state (such as current input symbol and line info) that + state can change before the exception is reported so current token index + is computed and stored at exception time. From this info, you can + perhaps print an entire line of input not just a single token, for example. + Better to just say the recognizer had a problem and then let the parser + figure out a fancy report. + + + + What input stream did the error occur in? + + + + What was the lookahead index when this exception was thrown? + + + + What is index of token/char were we looking at when the error occurred? + + + + The current Token when an error occurred. Since not all streams + can retrieve the ith Token, we have to track the Token object. + For parsers. Even when it's a tree parser, token might be set. + + + + + If this is a tree parser exception, node is set to the node with + the problem. + + + + The current char when an error occurred. For lexers. + + + + Track the line (1-based) at which the error occurred in case this is + generated from a lexer. We need to track this since the + unexpected char doesn't carry the line info. + + + + + The 0-based index into the line where the error occurred. + + + + + If you are parsing a tree node stream, you will encounter som + imaginary nodes w/o line/col info. We now search backwards looking + for most recent token with line/col info, but notify getErrorHeader() + that info is approximate. + + + + Used for remote debugger deserialization + + + Return the token type or char of the unexpected input element + + + + The set of fields needed by an abstract recognizer to recognize input + and recover from errors etc... As a separate state object, it can be + shared among multiple grammars; e.g., when one grammar imports another. + + + + These fields are publically visible but the actual state pointer per + parser is protected. + + + + + Track the set of token types that can follow any rule invocation. + Stack grows upwards. When it hits the max, it grows 2x in size + and keeps going. + + + + + This is true when we see an error and before having successfully + matched a token. Prevents generation of more than one error message + per error. + + + + + The index into the input stream where the last error occurred. + This is used to prevent infinite loops where an error is found + but no token is consumed during recovery...another error is found, + ad naseum. This is a failsafe mechanism to guarantee that at least + one token/tree node is consumed for two errors. + + + + + In lieu of a return value, this indicates that a rule or token + has failed to match. Reset to false upon valid token match. + + + + Did the recognizer encounter a syntax error? Track how many. + + + + If 0, no backtracking is going on. Safe to exec actions etc... + If >0 then it's the level of backtracking. + + + + + An array[size num rules] of dictionaries that tracks + the stop token index for each rule. ruleMemo[ruleIndex] is + the memoization table for ruleIndex. For key ruleStartIndex, you + get back the stop token for associated rule or MEMO_RULE_FAILED. + + + This is only used if rule memoization is on (which it is by default). + + + + The goal of all lexer rules/methods is to create a token object. + This is an instance variable as multiple rules may collaborate to + create a single token. nextToken will return this object after + matching lexer rule(s). If you subclass to allow multiple token + emissions, then set this to the last token to be matched or + something nonnull so that the auto token emit mechanism will not + emit another token. + + + + + What character index in the stream did the current token start at? + Needed, for example, to get the text for current token. Set at + the start of nextToken. + + + + The line on which the first character of the token resides + + + The character position of first character within the line + + + The channel number for the current token + + + The token type for the current token + + + + You can set the text for the current token to override what is in + the input char buffer. Use setText() or can set this instance var. + + + + + All tokens go to the parser (unless skip() is called in that rule) + on a particular "channel". The parser tunes to a particular channel + so that whitespace etc... can go to the parser on a "hidden" channel. + + + + + Anything on different channel than DEFAULT_CHANNEL is not parsed + by parser. + + + + Useful for dumping out the input stream after doing some + augmentation or other manipulations. + + You can insert stuff, replace, and delete chunks. Note that the + operations are done lazily--only if you convert the buffer to a + String. This is very efficient because you are not moving data around + all the time. As the buffer of tokens is converted to strings, the + toString() method(s) check to see if there is an operation at the + current index. If so, the operation is done and then normal String + rendering continues on the buffer. This is like having multiple Turing + machine instruction streams (programs) operating on a single input tape. :) + + Since the operations are done lazily at toString-time, operations do not + screw up the token index values. That is, an insert operation at token + index i does not change the index values for tokens i+1..n-1. + + Because operations never actually alter the buffer, you may always get + the original token stream back without undoing anything. Since + the instructions are queued up, you can easily simulate transactions and + roll back any changes if there is an error just by removing instructions. + For example, + + CharStream input = new ANTLRFileStream("input"); + TLexer lex = new TLexer(input); + TokenRewriteStream tokens = new TokenRewriteStream(lex); + T parser = new T(tokens); + parser.startRule(); + + Then in the rules, you can execute + Token t,u; + ... + input.insertAfter(t, "text to put after t");} + input.insertAfter(u, "text after u");} + System.out.println(tokens.toString()); + + Actually, you have to cast the 'input' to a TokenRewriteStream. :( + + You can also have multiple "instruction streams" and get multiple + rewrites from a single pass over the input. Just name the instruction + streams and use that name again when printing the buffer. This could be + useful for generating a C file and also its header file--all from the + same buffer: + + tokens.insertAfter("pass1", t, "text to put after t");} + tokens.insertAfter("pass2", u, "text after u");} + System.out.println(tokens.toString("pass1")); + System.out.println(tokens.toString("pass2")); + + If you don't use named rewrite streams, a "default" stream is used as + the first example shows. + + + What index into rewrites List are we? + + + Token buffer index. + + + + Execute the rewrite operation by possibly adding to the buffer. + Return the index of the next token to operate on. + + + + + I'm going to try replacing range from x..y with (y-x)+1 ReplaceOp + instructions. + + + + + You may have multiple, named streams of rewrite operations. + I'm calling these things "programs." + Maps String (name) -> rewrite (List) + + + + Map String (program name) -> Integer index + + + + Rollback the instruction stream for a program so that + the indicated instruction (via instructionIndex) is no + longer in the stream. UNTESTED! + + + + Reset the program so that no instructions exist + + + We need to combine operations and report invalid operations (like + overlapping replaces that are not completed nested). Inserts to + same index need to be combined etc... Here are the cases: + + I.i.u I.j.v leave alone, nonoverlapping + I.i.u I.i.v combine: Iivu + + R.i-j.u R.x-y.v | i-j in x-y delete first R + R.i-j.u R.i-j.v delete first R + R.i-j.u R.x-y.v | x-y in i-j ERROR + R.i-j.u R.x-y.v | boundaries overlap ERROR + + Delete special case of replace (text==null): + D.i-j.u D.x-y.v | boundaries overlap combine to max(min)..max(right) + + I.i.u R.x-y.v | i in (x+1)-y delete I (since insert before + we're not deleting i) + I.i.u R.x-y.v | i not in (x+1)-y leave alone, nonoverlapping + R.x-y.v I.i.u | i in x-y ERROR + R.x-y.v I.x.u R.x-y.uv (combine, delete I) + R.x-y.v I.i.u | i not in x-y leave alone, nonoverlapping + + I.i.u = insert u before op @ index i + R.x-y.u = replace x-y indexed tokens with u + + First we need to examine replaces. For any replace op: + + 1. wipe out any insertions before op within that range. + 2. Drop any replace op before that is contained completely within + that range. + 3. Throw exception upon boundary overlap with any previous replace. + + Then we can deal with inserts: + + 1. for any inserts to same index, combine even if not adjacent. + 2. for any prior replace with same left boundary, combine this + insert with replace and delete this replace. + 3. throw exception if index in same range as previous replace + + Don't actually delete; make op null in list. Easier to walk list. + Later we can throw as we add to index -> op map. + + Note that I.2 R.2-2 will wipe out I.2 even though, technically, the + inserted stuff would be before the replace range. But, if you + add tokens in front of a method body '{' and then delete the method + body, I think the stuff before the '{' you added should disappear too. + + Return a map from token index to operation. + + + Get all operations before an index of a particular kind + + + + In an action, a lexer rule can set token to this SKIP_TOKEN and ANTLR + will avoid creating a token for this symbol and try to fetch another. + + + + imaginary tree navigation type; traverse "get child" link + + + imaginary tree navigation type; finish with a child list + + + + A generic tree implementation with no payload. You must subclass to + actually have any user data. ANTLR v3 uses a list of children approach + instead of the child-sibling approach in v2. A flat tree (a list) is + an empty node whose children represent the list. An empty, but + non-null node is called "nil". + + + + + Create a new node from an existing node does nothing for BaseTree + as there are no fields other than the children list, which cannot + be copied as the children are not considered part of this node. + + + + + Get the children internal List; note that if you directly mess with + the list, do so at your own risk. + + + + BaseTree doesn't track parent pointers. + + + BaseTree doesn't track child indexes. + + + Add t as child of this node. + + + Warning: if t has no children, but child does + and child isNil then this routine moves children to t via + t.children = child.children; i.e., without copying the array. + + + + Add all elements of kids list as children of this node + + + Insert child t at child position i (0..n-1) by shifting children + i+1..n-1 to the right one position. Set parent / indexes properly + but does NOT collapse nil-rooted t's that come in here like addChild. + + + + Delete children from start to stop and replace with t even if t is + a list (nil-root tree). num of children can increase or decrease. + For huge child lists, inserting children can force walking rest of + children to set their childindex; could be slow. + + + + Override in a subclass to change the impl of children list + + + Set the parent and child index values for all child of t + + + Walk upwards looking for ancestor with this token type. + + + Walk upwards and get first ancestor with this token type. + + + + Return a list of all ancestors of this node. The first node of + list is the root and the last is the parent of this node. + + + + Print out a whole tree not just a node + + + Override to say how a node (not a tree) should look as text + + + A TreeAdaptor that works with any Tree implementation. + + + + System.identityHashCode() is not always unique; we have to + track ourselves. That's ok, it's only for debugging, though it's + expensive: we have to create a hashtable with all tree nodes in it. + + + + + Create tree node that holds the start and stop tokens associated + with an error. + + + + If you specify your own kind of tree nodes, you will likely have to + override this method. CommonTree returns Token.INVALID_TOKEN_TYPE + if no token payload but you might have to set token type for diff + node type. + + You don't have to subclass CommonErrorNode; you will likely need to + subclass your own tree node class to avoid class cast exception. + + + + + This is generic in the sense that it will work with any kind of + tree (not just ITree interface). It invokes the adaptor routines + not the tree node routines to do the construction. + + + + + Add a child to the tree t. If child is a flat tree (a list), make all + in list children of t. Warning: if t has no children, but child does + and child isNil then you can decide it is ok to move children to t via + t.children = child.children; i.e., without copying the array. Just + make sure that this is consistent with have the user will build + ASTs. + + + + + If oldRoot is a nil root, just copy or move the children to newRoot. + If not a nil root, make oldRoot a child of newRoot. + + + + old=^(nil a b c), new=r yields ^(r a b c) + old=^(a b c), new=r yields ^(r ^(a b c)) + + If newRoot is a nil-rooted single child tree, use the single + child as the new root node. + + old=^(nil a b c), new=^(nil r) yields ^(r a b c) + old=^(a b c), new=^(nil r) yields ^(r ^(a b c)) + + If oldRoot was null, it's ok, just return newRoot (even if isNil). + + old=null, new=r yields r + old=null, new=^(nil r) yields ^(nil r) + + Return newRoot. Throw an exception if newRoot is not a + simple node or nil root with a single child node--it must be a root + node. If newRoot is ^(nil x) return x as newRoot. + + Be advised that it's ok for newRoot to point at oldRoot's + children; i.e., you don't have to copy the list. We are + constructing these nodes so we should have this control for + efficiency. + + + + Transform ^(nil x) to x and nil to null + + + + Tell me how to create a token for use with imaginary token nodes. + For example, there is probably no input symbol associated with imaginary + token DECL, but you need to create it as a payload or whatever for + the DECL node as in ^(DECL type ID). + + + + If you care what the token payload objects' type is, you should + override this method and any other createToken variant. + + + + + Tell me how to create a token for use with imaginary token nodes. + For example, there is probably no input symbol associated with imaginary + token DECL, but you need to create it as a payload or whatever for + the DECL node as in ^(DECL type ID). + + + + This is a variant of createToken where the new token is derived from + an actual real input token. Typically this is for converting '{' + tokens to BLOCK etc... You'll see + + r : lc='{' ID+ '}' -> ^(BLOCK[$lc] ID+) ; + + If you care what the token payload objects' type is, you should + override this method and any other createToken variant. + + + + + Duplicate a node. This is part of the factory; + override if you want another kind of node to be built. + + + + I could use reflection to prevent having to override this + but reflection is slow. + + + + + Track start/stop token for subtree root created for a rule. + Only works with Tree nodes. For rules that match nothing, + seems like this will yield start=i and stop=i-1 in a nil node. + Might be useful info so I'll not force to be i..i. + + + + A buffered stream of tree nodes. Nodes can be from a tree of ANY kind. + + This node stream sucks all nodes out of the tree specified in + the constructor during construction and makes pointers into + the tree using an array of Object pointers. The stream necessarily + includes pointers to DOWN and UP and EOF nodes. + + This stream knows how to mark/release for backtracking. + + This stream is most suitable for tree interpreters that need to + jump around a lot or for tree parsers requiring speed (at cost of memory). + There is some duplicated functionality here with UnBufferedTreeNodeStream + but just in bookkeeping, not tree walking etc... + + TARGET DEVELOPERS: + + This is the old CommonTreeNodeStream that buffered up entire node stream. + No need to implement really as new CommonTreeNodeStream is much better + and covers what we need. + + @see CommonTreeNodeStream + + + The complete mapping from stream index to tree node. + This buffer includes pointers to DOWN, UP, and EOF nodes. + It is built upon ctor invocation. The elements are type + Object as we don't what the trees look like. + + Load upon first need of the buffer so we can set token types + of interest for reverseIndexing. Slows us down a wee bit to + do all of the if p==-1 testing everywhere though. + + + Pull nodes from which tree? + + + IF this tree (root) was created from a token stream, track it. + + + What tree adaptor was used to build these trees + + + Reuse same DOWN, UP navigation nodes unless this is true + + + The index into the nodes list of the current node (next node + to consume). If -1, nodes array not filled yet. + + + Track the last mark() call result value for use in rewind(). + + + Stack of indexes used for push/pop calls + + + Walk tree with depth-first-search and fill nodes buffer. + Don't do DOWN, UP nodes if its a list (t is isNil). + + + What is the stream index for node? 0..n-1 + Return -1 if node not found. + + + As we flatten the tree, we use UP, DOWN nodes to represent + the tree structure. When debugging we need unique nodes + so instantiate new ones when uniqueNavigationNodes is true. + + + Look backwards k nodes + + + + Make stream jump to a new location, saving old location. + Switch back with pop(). + + + + + Seek back to previous index saved during last push() call. + Return top of stack (return index). + + + + Used for testing, just return the token type stream + + + Debugging + + + A node representing erroneous token range in token stream + + + + A tree node that is wrapper for a Token object. After 3.0 release + while building tree rewrite stuff, it became clear that computing + parent and child index is very difficult and cumbersome. Better to + spend the space in every tree node. If you don't want these extra + fields, it's easy to cut them out in your own BaseTree subclass. + + + + A single token is the payload + + + + What token indexes bracket all tokens associated with this node + and below? + + + + Who is the parent node of this node; if null, implies node is root + + + What index is this node in the child list? Range: 0..n-1 + + + + For every node in this subtree, make sure it's start/stop token's + are set. Walk depth first, visit bottom up. Only updates nodes + with at least one token index < 0. + + + + + A TreeAdaptor that works with any Tree implementation. It provides + really just factory methods; all the work is done by BaseTreeAdaptor. + If you would like to have different tokens created than ClassicToken + objects, you need to override this and then set the parser tree adaptor to + use your subclass. + + + + To get your parser to build nodes of a different type, override + create(Token), errorNode(), and to be safe, YourTreeClass.dupNode(). + dupNode is called to duplicate nodes during rewrite operations. + + + + + Tell me how to create a token for use with imaginary token nodes. + For example, there is probably no input symbol associated with imaginary + token DECL, but you need to create it as a payload or whatever for + the DECL node as in ^(DECL type ID). + + + + If you care what the token payload objects' type is, you should + override this method and any other createToken variant. + + + + + Tell me how to create a token for use with imaginary token nodes. + For example, there is probably no input symbol associated with imaginary + token DECL, but you need to create it as a payload or whatever for + the DECL node as in ^(DECL type ID). + + + + This is a variant of createToken where the new token is derived from + an actual real input token. Typically this is for converting '{' + tokens to BLOCK etc... You'll see + + r : lc='{' ID+ '}' -> ^(BLOCK[$lc] ID+) ; + + If you care what the token payload objects' type is, you should + override this method and any other createToken variant. + + + + + What is the Token associated with this node? If + you are not using CommonTree, then you must + override this in your own adaptor. + + + + Pull nodes from which tree? + + + If this tree (root) was created from a token stream, track it. + + + What tree adaptor was used to build these trees + + + The tree iterator we are using + + + Stack of indexes used for push/pop calls + + + Tree (nil A B C) trees like flat A B C streams + + + Tracks tree depth. Level=0 means we're at root node level. + + + Tracks the last node before the start of {@link #data} which contains + position information to provide information for error reporting. This is + tracked in addition to {@link #prevElement} which may or may not contain + position information. + + @see #hasPositionInformation + @see RecognitionException#extractInformationFromTreeNodeStream + + + Make stream jump to a new location, saving old location. + Switch back with pop(). + + + Seek back to previous index saved during last push() call. + Return top of stack (return index). + + + Returns an element containing position information. If {@code allowApproximateLocation} is {@code false}, then + this method will return the {@code LT(1)} element if it contains position information, and otherwise return {@code null}. + If {@code allowApproximateLocation} is {@code true}, then this method will return the last known element containing position information. + + @see #hasPositionInformation + + + For debugging; destructive: moves tree iterator to end. + + + A utility class to generate DOT diagrams (graphviz) from + arbitrary trees. You can pass in your own templates and + can pass in any kind of tree or use Tree interface method. + I wanted this separator so that you don't have to include + ST just to use the org.antlr.runtime.tree.* package. + This is a set of non-static methods so you can subclass + to override. For example, here is an invocation: + + CharStream input = new ANTLRInputStream(System.in); + TLexer lex = new TLexer(input); + CommonTokenStream tokens = new CommonTokenStream(lex); + TParser parser = new TParser(tokens); + TParser.e_return r = parser.e(); + Tree t = (Tree)r.tree; + System.out.println(t.toStringTree()); + DOTTreeGenerator gen = new DOTTreeGenerator(); + StringTemplate st = gen.toDOT(t); + System.out.println(st); + + + Track node to number mapping so we can get proper node name back + + + Track node number so we can get unique node names + + + Generate DOT (graphviz) for a whole tree not just a node. + For example, 3+4*5 should generate: + + digraph { + node [shape=plaintext, fixedsize=true, fontsize=11, fontname="Courier", + width=.4, height=.2]; + edge [arrowsize=.7] + "+"->3 + "+"->"*" + "*"->4 + "*"->5 + } + + Takes a Tree interface object. + + + + @author Sam Harwell + + + Returns an element containing concrete information about the current + position in the stream. + + @param allowApproximateLocation if {@code false}, this method returns + {@code null} if an element containing exact information about the current + position is not available + + + Determines if the specified {@code element} contains concrete position + information. + + @param element the element to check + @return {@code true} if {@code element} contains concrete position + information, otherwise {@code false} + + + + What does a tree look like? ANTLR has a number of support classes + such as CommonTreeNodeStream that work on these kinds of trees. You + don't have to make your trees implement this interface, but if you do, + you'll be able to use more support code. + + + + NOTE: When constructing trees, ANTLR can build any kind of tree; it can + even use Token objects as trees if you add a child list to your tokens. + + This is a tree node without any payload; just navigation and factory stuff. + + + + Is there is a node above with token type ttype? + + + Walk upwards and get first ancestor with this token type. + + + + Return a list of all ancestors of this node. The first node of + list is the root and the last is the parent of this node. + + + + This node is what child index? 0..n-1 + + + Set the parent and child index values for all children + + + + Add t as a child to this node. If t is null, do nothing. If t + is nil, add all children of t to this' children. + + + + Set ith child (0..n-1) to t; t must be non-null and non-nil node + + + + Delete children from start to stop and replace with t even if t is + a list (nil-root tree). num of children can increase or decrease. + For huge child lists, inserting children can force walking rest of + children to set their childindex; could be slow. + + + + + Indicates the node is a nil node but may still have children, meaning + the tree is a flat list. + + + + + What is the smallest token index (indexing from 0) for this node + and its children? + + + + + What is the largest token index (indexing from 0) for this node + and its children? + + + + Return a token type; needed for tree parsing + + + In case we don't have a token payload, what is the line for errors? + + + + How to create and navigate trees. Rather than have a separate factory + and adaptor, I've merged them. Makes sense to encapsulate. + + + + This takes the place of the tree construction code generated in the + generated code in 2.x and the ASTFactory. + + I do not need to know the type of a tree at all so they are all + generic Objects. This may increase the amount of typecasting needed. :( + + + + + Create a tree node from Token object; for CommonTree type trees, + then the token just becomes the payload. This is the most + common create call. + + + + Override if you want another kind of node to be built. + + + + + Create a new node derived from a token, with a new token type. + This is invoked from an imaginary node ref on right side of a + rewrite rule as IMAG[$tokenLabel]. + + + + This should invoke createToken(Token). + + + + + Same as create(tokenType,fromToken) except set the text too. + This is invoked from an imaginary node ref on right side of a + rewrite rule as IMAG[$tokenLabel, "IMAG"]. + + + + This should invoke createToken(Token). + + + + + Same as create(fromToken) except set the text too. + This is invoked when the text terminal option is set, as in + IMAG<text='IMAG'>. + + + + This should invoke createToken(Token). + + + + + Create a new node derived from a token, with a new token type. + This is invoked from an imaginary node ref on right side of a + rewrite rule as IMAG["IMAG"]. + + + + This should invoke createToken(int,String). + + + + Duplicate a single tree node. + Override if you want another kind of node to be built. + + + Duplicate tree recursively, using dupNode() for each node + + + + Return a nil node (an empty but non-null node) that can hold + a list of element as the children. If you want a flat tree (a list) + use "t=adaptor.nil(); t.addChild(x); t.addChild(y);" + + + + + Return a tree node representing an error. This node records the + tokens consumed during error recovery. The start token indicates the + input symbol at which the error was detected. The stop token indicates + the last symbol consumed during recovery. + + + + You must specify the input stream so that the erroneous text can + be packaged up in the error node. The exception could be useful + to some applications; default implementation stores ptr to it in + the CommonErrorNode. + + This only makes sense during token parsing, not tree parsing. + Tree parsing should happen only when parsing and tree construction + succeed. + + + + Is tree considered a nil node used to make lists of child nodes? + + + + Add a child to the tree t. If child is a flat tree (a list), make all + in list children of t. Warning: if t has no children, but child does + and child isNil then you can decide it is ok to move children to t via + t.children = child.children; i.e., without copying the array. Just + make sure that this is consistent with have the user will build + ASTs. Do nothing if t or child is null. + + + + + If oldRoot is a nil root, just copy or move the children to newRoot. + If not a nil root, make oldRoot a child of newRoot. + + + + old=^(nil a b c), new=r yields ^(r a b c) + old=^(a b c), new=r yields ^(r ^(a b c)) + + If newRoot is a nil-rooted single child tree, use the single + child as the new root node. + + old=^(nil a b c), new=^(nil r) yields ^(r a b c) + old=^(a b c), new=^(nil r) yields ^(r ^(a b c)) + + If oldRoot was null, it's ok, just return newRoot (even if isNil). + + old=null, new=r yields r + old=null, new=^(nil r) yields ^(nil r) + + Return newRoot. Throw an exception if newRoot is not a + simple node or nil root with a single child node--it must be a root + node. If newRoot is ^(nil x) return x as newRoot. + + Be advised that it's ok for newRoot to point at oldRoot's + children; i.e., you don't have to copy the list. We are + constructing these nodes so we should have this control for + efficiency. + + + + + Given the root of the subtree created for this rule, post process + it to do any simplifications or whatever you want. A required + behavior is to convert ^(nil singleSubtree) to singleSubtree + as the setting of start/stop indexes relies on a single non-nil root + for non-flat trees. + + + + Flat trees such as for lists like "idlist : ID+ ;" are left alone + unless there is only one ID. For a list, the start/stop indexes + are set in the nil node. + + This method is executed after all rule tree construction and right + before setTokenBoundaries(). + + + + For identifying trees. + + + How to identify nodes so we can say "add node to a prior node"? + Even becomeRoot is an issue. Use System.identityHashCode(node) + usually. + + + + + Create a node for newRoot make it the root of oldRoot. + If oldRoot is a nil root, just copy or move the children to newRoot. + If not a nil root, make oldRoot a child of newRoot. + + + + Return node created for newRoot. + + + + Be advised: when debugging ASTs, the DebugTreeAdaptor manually + calls create(Token child) and then plain becomeRoot(node, node) + because it needs to trap calls to create, but it can't since it delegates + to not inherits from the TreeAdaptor. + + + + For tree parsing, I need to know the token type of a node + + + Node constructors can set the type of a node + + + Node constructors can set the text of a node + + + + Return the token object from which this node was created. + Currently used only for printing an error message. + The error display routine in BaseRecognizer needs to + display where the input the error occurred. If your + tree of limitation does not store information that can + lead you to the token, you can create a token filled with + the appropriate information and pass that back. See + BaseRecognizer.getErrorMessage(). + + + + + Where are the bounds in the input token stream for this node and + all children? Each rule that creates AST nodes will call this + method right before returning. Flat trees (i.e., lists) will + still usually have a nil root node just to hold the children list. + That node would contain the start/stop indexes then. + + + + Get the token start index for this subtree; return -1 if no such index + + + Get the token stop index for this subtree; return -1 if no such index + + + Get a child 0..n-1 node + + + Set ith child (0..n-1) to t; t must be non-null and non-nil node + + + Remove ith child and shift children down from right. + + + How many children? If 0, then this is a leaf node + + + + Who is the parent node of this node; if null, implies node is root. + If your node type doesn't handle this, it's ok but the tree rewrites + in tree parsers need this functionality. + + + + + What index is this node in the child list? Range: 0..n-1 + If your node type doesn't handle this, it's ok but the tree rewrites + in tree parsers need this functionality. + + + + + Replace from start to stop child index of parent with t, which might + be a list. Number of children may be different after this call. + + + + If parent is null, don't do anything; must be at root of overall tree. + Can't replace whatever points to the parent externally. Do nothing. + + + + A stream of tree nodes, accessing nodes from a tree of some kind + + + + Get a tree node at an absolute index i; 0..n-1. + If you don't want to buffer up nodes, then this method makes no + sense for you. + + + + + Get tree node at current input pointer + ahead where + ==1 is next node. <0 indicates nodes in the past. So + {@code LT(-1)} is previous node, but implementations are not required to + provide results for < -1. {@code LT(0)} is undefined. For + <=n, return . Return for {@code LT(0)} + and any index that results in an absolute address that is negative. + + + + This is analogous to , but this returns a tree node + instead of a . Makes code generation identical for both + parser and tree grammars. + + + + + Where is this stream pulling nodes from? This is not the name, but + the object that provides node objects. + + + + + If the tree associated with this stream was created from a + {@link TokenStream}, you can specify it here. Used to do rule + {@code $text} attribute in tree parser. Optional unless you use tree + parser rule {@code $text} attribute or {@code output=template} and + {@code rewrite=true} options. + + + + + What adaptor can tell me how to interpret/navigate nodes and + trees. E.g., get text of a node. + + + + + As we flatten the tree, we use {@link Token#UP}, {@link Token#DOWN} nodes + to represent the tree structure. When debugging we need unique nodes so + we have to instantiate new ones. When doing normal tree parsing, it's + slow and a waste of memory to create unique navigation nodes. Default + should be {@code false}. + + + + + Return the text of all nodes from {@code start} to {@code stop}, + inclusive. If the stream does not buffer all the nodes then it can still + walk recursively from start until stop. You can always return + {@code null} or {@code ""} too, but users should not access + {@code $ruleLabel.text} in an action of course in that case. + + + + + Replace children of {@code parent} from index {@code startChildIndex} to + {@code stopChildIndex} with {@code t}, which might be a list. Number of + children may be different after this call. The stream is notified because + it is walking the tree and might need to know you are monkeying with the + underlying tree. Also, it might be able to modify the node stream to + avoid restreaming for future phases. + + + + If {@code parent} is {@code null}, don't do anything; must be at root of + overall tree. Can't replace whatever points to the parent externally. Do + nothing. + + + + + How to execute code for node t when a visitor visits node t. Execute + pre() before visiting children and execute post() after visiting children. + + + + + Execute an action before visiting children of t. Return t or + a rewritten t. It is up to the visitor to decide what to do + with the return value. Children of returned value will be + visited if using TreeVisitor.visit(). + + + + + Execute an action after visiting children of t. Return t or + a rewritten t. It is up to the visitor to decide what to do + with the return value. + + + + + A record of the rules used to match a token sequence. The tokens + end up as the leaves of this tree and rule nodes are the interior nodes. + This really adds no functionality, it is just an alias for CommonTree + that is more meaningful (specific) and holds a String to display for a node. + + + + + Emit a token and all hidden nodes before. EOF node holds all + hidden tokens after last real token. + + + + + Print out the leaves of this tree, which means printing original + input back out. + + + + + Base class for all exceptions thrown during AST rewrite construction. + This signifies a case where the cardinality of two or more elements + in a subrule are different: (ID INT)+ where |ID|!=|INT| + + + + No elements within a (...)+ in a rewrite rule + + + Ref to ID or expr but no tokens in ID stream or subtrees in expr stream + + + + A generic list of elements tracked in an alternative to be used in + a -> rewrite rule. We need to subclass to fill in the next() method, + which returns either an AST node wrapped around a token payload or + an existing subtree. + + + + Once you start next()ing, do not try to add more elements. It will + break the cursor tracking I believe. + + TODO: add mechanism to detect/puke on modification after reading from stream + + + + + + + + Cursor 0..n-1. If singleElement!=null, cursor is 0 until you next(), + which bumps it to 1 meaning no more elements. + + + + Track single elements w/o creating a list. Upon 2nd add, alloc list + + + The list of tokens or subtrees we are tracking + + + Once a node / subtree has been used in a stream, it must be dup'd + from then on. Streams are reset after subrules so that the streams + can be reused in future subrules. So, reset must set a dirty bit. + If dirty, then next() always returns a dup. + + + The element or stream description; usually has name of the token or + rule reference that this list tracks. Can include rulename too, but + the exception would track that info. + + + Create a stream with one element + + + Create a stream, but feed off an existing list + + + + Reset the condition of this stream so that it appears we have + not consumed any of its elements. Elements themselves are untouched. + Once we reset the stream, any future use will need duplicates. Set + the dirty bit. + + + + + Return the next element in the stream. If out of elements, throw + an exception unless size()==1. If size is 1, then return elements[0]. + Return a duplicate node/subtree if stream is out of elements and + size==1. If we've already used the element, dup (dirty bit set). + + + + + Do the work of getting the next element, making sure that it's + a tree node or subtree. Deal with the optimization of single- + element list versus list of size > 1. Throw an exception + if the stream is empty or we're out of elements and size>1. + protected so you can override in a subclass if necessary. + + + + + When constructing trees, sometimes we need to dup a token or AST + subtree. Dup'ing a token means just creating another AST node + around it. For trees, you must call the adaptor.dupTree() unless + the element is for a tree root; then it must be a node dup. + + + + + Ensure stream emits trees; tokens must be converted to AST nodes. + AST nodes can be passed through unmolested. + + + + + Queues up nodes matched on left side of -> in a tree parser. This is + the analog of RewriteRuleTokenStream for normal parsers. + + + + Create a stream with one element + + + Create a stream, but feed off an existing list + + + Create a stream with one element + + + Create a stream, but feed off an existing list + + + + Treat next element as a single node even if it's a subtree. + This is used instead of next() when the result has to be a + tree root node. Also prevents us from duplicating recently-added + children; e.g., ^(type ID)+ adds ID to type and then 2nd iteration + must dup the type node, but ID has been added. + + + + Referencing a rule result twice is ok; dup entire tree as + we can't be adding trees as root; e.g., expr expr. + + Hideous code duplication here with super.next(). Can't think of + a proper way to refactor. This needs to always call dup node + and super.next() doesn't know which to call: dup node or dup tree. + + + + Create a stream with one element + + + Create a stream, but feed off an existing list + + + Get next token from stream and make a node for it + + + + Don't convert to a tree unless they explicitly call nextTree. + This way we can do hetero tree nodes in rewrite. + + + + Return a node stream from a doubly-linked tree whose nodes + know what child index they are. No remove() is supported. + + Emit navigation nodes (DOWN, UP, and EOF) to let show tree structure. + + + If we emit UP/DOWN nodes, we need to spit out multiple nodes per + next() call. + + + + A parser for a stream of tree nodes. "tree grammars" result in a subclass + of this. All the error reporting and recovery is shared with Parser via + the BaseRecognizer superclass. + + + + Set the input stream + + + + Match '.' in tree parser has special meaning. Skip node or + entire tree if node has children. If children, scan until + corresponding UP node. + + + + + We have DOWN/UP nodes in the stream that have no line info; override. + plus we want to alter the exception type. Don't try to recover + from tree parser errors inline... + + + + + Prefix error message with the grammar name because message is + always intended for the programmer because the parser built + the input tree not the user. + + + + + Tree parsers parse nodes they usually have a token object as + payload. Set the exception token and do the default behavior. + + + + The tree pattern to lex like "(A B C)" + + + Index into input string + + + Current char + + + How long is the pattern in char? + + + Set when token type is ID or ARG (name mimics Java's StreamTokenizer) + + + Override this if you need transformation tracing to go somewhere + other than stdout or if you're not using ITree-derived trees. + + + + This is identical to the ParserRuleReturnScope except that + the start property is a tree nodes not Token object + when you are parsing trees. + + + + Gets the first node or root node of tree matched for this rule. + + + Do a depth first walk of a tree, applying pre() and post() actions as we go. + + + + Visit every node in tree t and trigger an action for each node + before/after having visited all of its children. Bottom up walk. + Execute both actions even if t has no children. Ignore return + results from transforming children since they will have altered + the child list of this node (their parent). Return result of + applying post action to this node. + + + + + Build and navigate trees with this object. Must know about the names + of tokens so you have to pass in a map or array of token names (from which + this class can build the map). I.e., Token DECL means nothing unless the + class can translate it to a token type. + + + + In order to create nodes and navigate, this class needs a TreeAdaptor. + + This class can build a token type -> node index for repeated use or for + iterating over the various nodes with a particular type. + + This class works in conjunction with the TreeAdaptor rather than moving + all this functionality into the adaptor. An adaptor helps build and + navigate trees using methods. This class helps you do it with string + patterns like "(A B C)". You can create a tree from that pattern or + match subtrees against it. + + + + + When using %label:TOKENNAME in a tree for parse(), we must + track the label. + + + + This adaptor creates TreePattern objects for use during scan() + + + + Compute a Map<String, Integer> that is an inverted index of + tokenNames (which maps int token types to names). + + + + Using the map of token names to token types, return the type. + + + + Walk the entire tree and make a node name to nodes mapping. + For now, use recursion but later nonrecursive version may be + more efficient. Returns Map<Integer, List> where the List is + of your AST node type. The Integer is the token type of the node. + + + + TODO: save this index so that find and visit are faster + + + + Do the work for index + + + Return a List of tree nodes with token type ttype + + + Return a List of subtrees matching pattern. + + + + Visit every ttype node in t, invoking the visitor. This is a quicker + version of the general visit(t, pattern) method. The labels arg + of the visitor action method is never set (it's null) since using + a token type rather than a pattern doesn't let us set a label. + + + + Do the recursive work for visit + + + + For all subtrees that match the pattern, execute the visit action. + The implementation uses the root node of the pattern in combination + with visit(t, ttype, visitor) so nil-rooted patterns are not allowed. + Patterns with wildcard roots are also not allowed. + + + + + Given a pattern like (ASSIGN %lhs:ID %rhs:.) with optional labels + on the various nodes and '.' (dot) as the node/subtree wildcard, + return true if the pattern matches and fill the labels Map with + the labels pointing at the appropriate nodes. Return false if + the pattern is malformed or the tree does not match. + + + + If a node specifies a text arg in pattern, then that must match + for that node in t. + + TODO: what's a better way to indicate bad pattern? Exceptions are a hassle + + + + + Do the work for parse. Check to see if the t2 pattern fits the + structure and token types in t1. Check text if the pattern has + text arguments on nodes. Fill labels map with pointers to nodes + in tree matched against nodes in pattern with labels. + + + + + Create a tree or node from the indicated tree pattern that closely + follows ANTLR tree grammar tree element syntax: + + (root child1 ... child2). + + + + You can also just pass in a node: ID + + Any node can have a text argument: ID[foo] + (notice there are no quotes around foo--it's clear it's a string). + + nil is a special name meaning "give me a nil node". Useful for + making lists: (nil A B C) is a list of A B C. + + + + + Compare t1 and t2; return true if token types/text, structure match exactly. + The trees are examined in their entirety so that (A B) does not match + (A B C) nor (A (B C)). + + + + TODO: allow them to pass in a comparator + TODO: have a version that is nonstatic so it can use instance adaptor + + I cannot rely on the tree node's equals() implementation as I make + no constraints at all on the node types nor interface etc... + + + + + Compare type, structure, and text of two trees, assuming adaptor in + this instance of a TreeWizard. + + + + A token stream that pulls tokens from the code source on-demand and + without tracking a complete buffer of the tokens. This stream buffers + the minimum number of tokens possible. It's the same as + OnDemandTokenStream except that OnDemandTokenStream buffers all tokens. + + You can't use this stream if you pass whitespace or other off-channel + tokens to the parser. The stream can't ignore off-channel tokens. + + You can only look backwards 1 token: LT(-1). + + Use this when you need to read from a socket or other infinite stream. + + @see BufferedTokenStream + @see CommonTokenStream + + + Skip tokens on any channel but this one; this is how we skip whitespace... + + + An extra token while parsing a TokenStream + + + diff --git a/nhibernateg7/packages/Antlr3.Runtime.3.5.1/lib/portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1/Antlr3.Runtime.dll b/nhibernateg7/packages/Antlr3.Runtime.3.5.1/lib/portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1/Antlr3.Runtime.dll new file mode 100644 index 0000000..63a4ba8 Binary files /dev/null and b/nhibernateg7/packages/Antlr3.Runtime.3.5.1/lib/portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1/Antlr3.Runtime.dll differ diff --git a/nhibernateg7/packages/Antlr3.Runtime.3.5.1/lib/portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1/Antlr3.Runtime.xml b/nhibernateg7/packages/Antlr3.Runtime.3.5.1/lib/portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1/Antlr3.Runtime.xml new file mode 100644 index 0000000..31d731f --- /dev/null +++ b/nhibernateg7/packages/Antlr3.Runtime.3.5.1/lib/portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1/Antlr3.Runtime.xml @@ -0,0 +1,3220 @@ + + + + Antlr3.Runtime + + + + + A kind of ReaderStream that pulls from an InputStream. + Useful for reading from stdin and specifying file encodings etc... + + + + + Vacuum all input from a Reader and then treat it like a StringStream. + Manage the buffer manually to avoid unnecessary data copying. + + + + If you need encoding, use ANTLRInputStream. + + + + + A pretty quick CharStream that pulls all data from an array + directly. Every method call counts in the lexer. Java's + strings aren't very good so I'm avoiding. + + + + The data being scanned + + + How many characters are actually in the buffer + + + 0..n-1 index into string of next char + + + line number 1..n within the input + + + The index of the character relative to the beginning of the line 0..n-1 + + + tracks how deep mark() calls are nested + + + + A list of CharStreamState objects that tracks the stream state + values line, charPositionInLine, and p that can change as you + move through the input stream. Indexed from 1..markDepth. + A null is kept @ index 0. Create upon first call to mark(). + + + + Track the last mark() call result value for use in rewind(). + + + What is name or source of this char stream? + + + Copy data in string to a local char array + + + This is the preferred constructor as no data is copied + + + + Return the current input symbol index 0..n where n indicates the + last symbol has been read. The index is the index of char to + be returned from LA(1). + + + + + Reset the stream so that it's in the same state it was + when the object was created *except* the data array is not + touched. + + + + + consume() ahead until p==index; can't just set p=index as we must + update line and charPositionInLine. + + + + + A generic recognizer that can handle recognizers generated from + lexer, parser, and tree grammars. This is all the parsing + support code essentially; most of it is error recovery stuff and + backtracking. + + + + + State of a lexer, parser, or tree parser are collected into a state + object so the state can be shared. This sharing is needed to + have one grammar import others and share same error variables + and other state variables. It's a kind of explicit multiple + inheritance via delegation of methods and shared state. + + + + reset the parser's state; subclasses must rewinds the input stream + + + + Match current input symbol against ttype. Attempt + single token insertion or deletion error recovery. If + that fails, throw MismatchedTokenException. + + + + To turn off single token insertion or deletion error + recovery, override recoverFromMismatchedToken() and have it + throw an exception. See TreeParser.recoverFromMismatchedToken(). + This way any error in a rule will cause an exception and + immediate exit from rule. Rule would recover by resynchronizing + to the set of symbols that can follow rule ref. + + + + Match the wildcard: in a symbol + + + Report a recognition problem. + + + This method sets errorRecovery to indicate the parser is recovering + not parsing. Once in recovery mode, no errors are generated. + To get out of recovery mode, the parser must successfully match + a token (after a resync). So it will go: + + 1. error occurs + 2. enter recovery mode, report error + 3. consume until token found in resynch set + 4. try to resume parsing + 5. next match() will reset errorRecovery mode + + If you override, make sure to update syntaxErrors if you care about that. + + + + What error message should be generated for the various exception types? + + + Not very object-oriented code, but I like having all error message + generation within one method rather than spread among all of the + exception classes. This also makes it much easier for the exception + handling because the exception classes do not have to have pointers back + to this object to access utility routines and so on. Also, changing + the message for an exception type would be difficult because you + would have to subclassing exception, but then somehow get ANTLR + to make those kinds of exception objects instead of the default. + This looks weird, but trust me--it makes the most sense in terms + of flexibility. + + For grammar debugging, you will want to override this to add + more information such as the stack frame with + getRuleInvocationStack(e, this.getClass().getName()) and, + for no viable alts, the decision description and state etc... + + Override this to change the message generated for one or more + exception types. + + + + + Get number of recognition errors (lexer, parser, tree parser). Each + recognizer tracks its own number. So parser and lexer each have + separate count. Does not count the spurious errors found between + an error and next valid token match + + + + + + What is the error header, normally line/character position information? + + + + How should a token be displayed in an error message? The default + is to display just the text, but during development you might + want to have a lot of information spit out. Override in that case + to use t.ToString() (which, for CommonToken, dumps everything about + the token). This is better than forcing you to override a method in + your token objects because you don't have to go modify your lexer + so that it creates a new Java type. + + + + Override this method to change where error messages go + + + + Recover from an error found on the input stream. This is + for NoViableAlt and mismatched symbol exceptions. If you enable + single token insertion and deletion, this will usually not + handle mismatched symbol exceptions but there could be a mismatched + token that the match() routine could not recover from. + + + + + A hook to listen in on the token consumption during error recovery. + The DebugParser subclasses this to fire events to the listenter. + + + + + Compute the context-sensitive FOLLOW set for current rule. + This is set of token types that can follow a specific rule + reference given a specific call chain. You get the set of + viable tokens that can possibly come next (lookahead depth 1) + given the current call chain. Contrast this with the + definition of plain FOLLOW for rule r: + + + FOLLOW(r)={x | S=>*alpha r beta in G and x in FIRST(beta)} + + where x in T* and alpha, beta in V*; T is set of terminals and + V is the set of terminals and nonterminals. In other words, + FOLLOW(r) is the set of all tokens that can possibly follow + references to r in *any* sentential form (context). At + runtime, however, we know precisely which context applies as + we have the call chain. We may compute the exact (rather + than covering superset) set of following tokens. + + For example, consider grammar: + + stat : ID '=' expr ';' // FOLLOW(stat)=={EOF} + | "return" expr '.' + ; + expr : atom ('+' atom)* ; // FOLLOW(expr)=={';','.',')'} + atom : INT // FOLLOW(atom)=={'+',')',';','.'} + | '(' expr ')' + ; + + The FOLLOW sets are all inclusive whereas context-sensitive + FOLLOW sets are precisely what could follow a rule reference. + For input input "i=(3);", here is the derivation: + + stat => ID '=' expr ';' + => ID '=' atom ('+' atom)* ';' + => ID '=' '(' expr ')' ('+' atom)* ';' + => ID '=' '(' atom ')' ('+' atom)* ';' + => ID '=' '(' INT ')' ('+' atom)* ';' + => ID '=' '(' INT ')' ';' + + At the "3" token, you'd have a call chain of + + stat -> expr -> atom -> expr -> atom + + What can follow that specific nested ref to atom? Exactly ')' + as you can see by looking at the derivation of this specific + input. Contrast this with the FOLLOW(atom)={'+',')',';','.'}. + + You want the exact viable token set when recovering from a + token mismatch. Upon token mismatch, if LA(1) is member of + the viable next token set, then you know there is most likely + a missing token in the input stream. "Insert" one by just not + throwing an exception. + + + Attempt to recover from a single missing or extra token. + + EXTRA TOKEN + + LA(1) is not what we are looking for. If LA(2) has the right token, + however, then assume LA(1) is some extra spurious token. Delete it + and LA(2) as if we were doing a normal match(), which advances the + input. + + MISSING TOKEN + + If current token is consistent with what could come after + ttype then it is ok to "insert" the missing token, else throw + exception For example, Input "i=(3;" is clearly missing the + ')'. When the parser returns from the nested call to expr, it + will have call chain: + + stat -> expr -> atom + + and it will be trying to match the ')' at this point in the + derivation: + + => ID '=' '(' INT ')' ('+' atom)* ';' + ^ + match() will see that ';' doesn't match ')' and report a + mismatched token error. To recover, it sees that LA(1)==';' + is in the set of tokens that can follow the ')' token + reference in rule atom. It can assume that you forgot the ')'. + + + Not currently used + + + + Match needs to return the current input symbol, which gets put + into the label for the associated token ref; e.g., x=ID. Token + and tree parsers need to return different objects. Rather than test + for input stream type or change the IntStream interface, I use + a simple method to ask the recognizer to tell me what the current + input symbol is. + + + This is ignored for lexers. + + + Conjure up a missing token during error recovery. + + + The recognizer attempts to recover from single missing + symbols. But, actions might refer to that missing symbol. + For example, x=ID {f($x);}. The action clearly assumes + that there has been an identifier matched previously and that + $x points at that token. If that token is missing, but + the next token in the stream is what we want we assume that + this token is missing and we keep going. Because we + have to return some token to replace the missing token, + we have to conjure one up. This method gives the user control + over the tokens returned for missing tokens. Mostly, + you will want to create something special for identifier + tokens. For literals such as '{' and ',', the default + action in the parser or tree parser works. It simply creates + a CommonToken of the appropriate type. The text will be the token. + If you change what tokens must be created by the lexer, + override this method to create the appropriate tokens. + + + + Consume tokens until one matches the given token set + + + Push a rule's follow set using our own hardcoded stack + + + Return whether or not a backtracking attempt failed. + + + + Used to print out token names like ID during debugging and + error reporting. The generated parsers implement a method + that overrides this to point to their String[] tokenNames. + + + + + For debugging and other purposes, might want the grammar name. + Have ANTLR generate an implementation for this method. + + + + + A convenience method for use most often with template rewrites. + Convert a list of to a list of . + + + + + Given a rule number and a start token index number, return + MEMO_RULE_UNKNOWN if the rule has not parsed input starting from + start index. If this rule has parsed input starting from the + start index before, then return where the rule stopped parsing. + It returns the index of the last token matched by the rule. + + + + For now we use a hashtable and just the slow Object-based one. + Later, we can make a special one for ints and also one that + tosses out data after we commit past input position i. + + + + + Has this rule already parsed input at the current index in the + input stream? Return the stop token index or MEMO_RULE_UNKNOWN. + If we attempted but failed to parse properly before, return + MEMO_RULE_FAILED. + + + + This method has a side-effect: if we have seen this input for + this rule and successfully parsed before, then seek ahead to + 1 past the stop token matched for this rule last time. + + + + + Record whether or not this rule parsed the input at this position + successfully. Use a standard java hashtable for now. + + + + return how many rule/input-index pairs there are in total. + TODO: this includes synpreds. :( + + + + A stripped-down version of org.antlr.misc.BitSet that is just + good enough to handle runtime requirements such as FOLLOW sets + for automatic error recovery. + + + + + We will often need to do a mod operator (i mod nbits). Its + turns out that, for powers of two, this mod operation is + same as (i & (nbits-1)). Since mod is slow, we use a + precomputed mod mask to do the mod instead. + + + + The actual data bits + + + Construct a bitset of size one word (64 bits) + + + Construction from a static array of longs + + + Construction from a list of integers + + + Construct a bitset given the size + The size of the bitset in bits + + + return this | a in a new set + + + or this element into this set (grow as necessary to accommodate) + + + Grows the set to a larger number of bits. + element that must fit in set + + + Sets the size of a set. + how many words the new set should be + + + return how much space is being used by the bits array not how many actually have member bits on. + + + Is this contained within a? + + + Buffer all input tokens but do on-demand fetching of new tokens from + lexer. Useful when the parser or lexer has to set context/mode info before + proper lexing of future tokens. The ST template parser needs this, + for example, because it has to constantly flip back and forth between + inside/output templates. E.g., <names:{hi, <it>}> has to parse names + as part of an expression but "hi, <it>" as a nested template. + + You can't use this stream if you pass whitespace or other off-channel + tokens to the parser. The stream can't ignore off-channel tokens. + (UnbufferedTokenStream is the same way.) + + This is not a subclass of UnbufferedTokenStream because I don't want + to confuse small moving window of tokens it uses for the full buffer. + + + Record every single token pulled from the source so we can reproduce + chunks of it later. The buffer in LookaheadStream overlaps sometimes + as its moving window moves through the input. This list captures + everything so we can access complete input text. + + + Track the last mark() call result value for use in rewind(). + + + The index into the tokens list of the current token (next token + to consume). tokens[p] should be LT(1). p=-1 indicates need + to initialize with first token. The ctor doesn't get a token. + First call to LT(1) or whatever gets the first token and sets p=0; + + + + How deep have we gone? + + + + Move the input pointer to the next incoming token. The stream + must become active with LT(1) available. consume() simply + moves the input pointer so that LT(1) points at the next + input symbol. Consume at least one token. + + Walk past any token not on the channel the parser is listening to. + + + Make sure index i in tokens has a token. + + + add n elements to buffer + + + Given a start and stop index, return a List of all tokens in + the token type BitSet. Return null if no tokens were found. This + method looks at both on and off channel tokens. + + + + When walking ahead with cyclic DFA or for syntactic predicates, + we need to record the state of the input stream (char index, + line, etc...) so that we can rewind the state after scanning ahead. + + + This is the complete state of a stream. + + + Index into the char stream of next lookahead char + + + What line number is the scanner at before processing buffer[p]? + + + What char position 0..n-1 in line is scanner before processing buffer[p]? + + + + A Token object like we'd use in ANTLR 2.x; has an actual string created + and associated with this object. These objects are needed for imaginary + tree nodes that have payload objects. We need to create a Token object + that has a string; the tree node will point at this token. CommonToken + has indexes into a char stream and hence cannot be used to introduce + new strings. + + + + What token number is this from 0..n-1 tokens + + + + We need to be able to change the text once in a while. If + this is non-null, then getText should return this. Note that + start/stop are not affected by changing this. + + + + What token number is this from 0..n-1 tokens; < 0 implies invalid index + + + The char position into the input buffer where this token starts + + + The char position into the input buffer where this token stops + + + + The most common stream of tokens is one where every token is buffered up + and tokens are prefiltered for a certain channel (the parser will only + see these tokens and cannot change the filter channel number during the + parse). + + + TODO: how to access the full token stream? How to track all tokens matched per rule? + + + Skip tokens on any channel but this one; this is how we skip whitespace... + + + Reset this token stream by setting its token source. + + + Always leave p on an on-channel token. + + + Given a starting index, return the index of the first on-channel + token. + + + All debugging events that a recognizer can trigger. + + + I did not create a separate AST debugging interface as it would create + lots of extra classes and DebugParser has a dbg var defined, which makes + it hard to change to ASTDebugEventListener. I looked hard at this issue + and it is easier to understand as one monolithic event interface for all + possible events. Hopefully, adding ST debugging stuff won't be bad. Leave + for future. 4/26/2006. + + + + + The parser has just entered a rule. No decision has been made about + which alt is predicted. This is fired AFTER init actions have been + executed. Attributes are defined and available etc... + The grammarFileName allows composite grammars to jump around among + multiple grammar files. + + + + + Because rules can have lots of alternatives, it is very useful to + know which alt you are entering. This is 1..n for n alts. + + + + + This is the last thing executed before leaving a rule. It is + executed even if an exception is thrown. This is triggered after + error reporting and recovery have occurred (unless the exception is + not caught in this rule). This implies an "exitAlt" event. + The grammarFileName allows composite grammars to jump around among + multiple grammar files. + + + + Track entry into any (...) subrule other EBNF construct + + + + Every decision, fixed k or arbitrary, has an enter/exit event + so that a GUI can easily track what LT/consume events are + associated with prediction. You will see a single enter/exit + subrule but multiple enter/exit decision events, one for each + loop iteration. + + + + + An input token was consumed; matched by any kind of element. + Trigger after the token was matched by things like match(), matchAny(). + + + + + An off-channel input token was consumed. + Trigger after the token was matched by things like match(), matchAny(). + (unless of course the hidden token is first stuff in the input stream). + + + + + Somebody (anybody) looked ahead. Note that this actually gets + triggered by both LA and LT calls. The debugger will want to know + which Token object was examined. Like consumeToken, this indicates + what token was seen at that depth. A remote debugger cannot look + ahead into a file it doesn't have so LT events must pass the token + even if the info is redundant. + + + + + The parser is going to look arbitrarily ahead; mark this location, + the token stream's marker is sent in case you need it. + + + + + After an arbitrairly long lookahead as with a cyclic DFA (or with + any backtrack), this informs the debugger that stream should be + rewound to the position associated with marker. + + + + + Rewind to the input position of the last marker. + Used currently only after a cyclic DFA and just + before starting a sem/syn predicate to get the + input position back to the start of the decision. + Do not "pop" the marker off the state. mark(i) + and rewind(i) should balance still. + + + + + To watch a parser move through the grammar, the parser needs to + inform the debugger what line/charPos it is passing in the grammar. + For now, this does not know how to switch from one grammar to the + other and back for island grammars etc... + + + + This should also allow breakpoints because the debugger can stop + the parser whenever it hits this line/pos. + + + + + A recognition exception occurred such as NoViableAltException. I made + this a generic event so that I can alter the exception hierachy later + without having to alter all the debug objects. + + + + Upon error, the stack of enter rule/subrule must be properly unwound. + If no viable alt occurs it is within an enter/exit decision, which + also must be rewound. Even the rewind for each mark must be unwount. + In the Java target this is pretty easy using try/finally, if a bit + ugly in the generated code. The rewind is generated in DFA.predict() + actually so no code needs to be generated for that. For languages + w/o this "finally" feature (C++?), the target implementor will have + to build an event stack or something. + + Across a socket for remote debugging, only the RecognitionException + data fields are transmitted. The token object or whatever that + caused the problem was the last object referenced by LT. The + immediately preceding LT event should hold the unexpected Token or + char. + + Here is a sample event trace for grammar: + + b : C ({;}A|B) // {;} is there to prevent A|B becoming a set + | D + ; + + The sequence for this rule (with no viable alt in the subrule) for + input 'c c' (there are 3 tokens) is: + + commence + LT(1) + enterRule b + location 7 1 + enter decision 3 + LT(1) + exit decision 3 + enterAlt1 + location 7 5 + LT(1) + consumeToken [c/<4>,1:0] + location 7 7 + enterSubRule 2 + enter decision 2 + LT(1) + LT(1) + recognitionException NoViableAltException 2 1 2 + exit decision 2 + exitSubRule 2 + beginResync + LT(1) + consumeToken [c/<4>,1:1] + LT(1) + endResync + LT(-1) + exitRule b + terminate + + + + + Indicates the recognizer is about to consume tokens to resynchronize + the parser. Any consume events from here until the recovered event + are not part of the parse--they are dead tokens. + + + + + Indicates that the recognizer has finished consuming tokens in order + to resychronize. There may be multiple beginResync/endResync pairs + before the recognizer comes out of errorRecovery mode (in which + multiple errors are suppressed). This will be useful + in a gui where you want to probably grey out tokens that are consumed + but not matched to anything in grammar. Anything between + a beginResync/endResync pair was tossed out by the parser. + + + + A semantic predicate was evaluate with this result and action text + + + + Announce that parsing has begun. Not technically useful except for + sending events over a socket. A GUI for example will launch a thread + to connect and communicate with a remote parser. The thread will want + to notify the GUI when a connection is made. ANTLR parsers + trigger this upon entry to the first rule (the ruleLevel is used to + figure this out). + + + + + Parsing is over; successfully or not. Mostly useful for telling + remote debugging listeners that it's time to quit. When the rule + invocation level goes to zero at the end of a rule, we are done + parsing. + + + + + Input for a tree parser is an AST, but we know nothing for sure + about a node except its type and text (obtained from the adaptor). + This is the analog of the consumeToken method. Again, the ID is + the hashCode usually of the node so it only works if hashCode is + not implemented. If the type is UP or DOWN, then + the ID is not really meaningful as it's fixed--there is + just one UP node and one DOWN navigation node. + + + + + + + The tree parser lookedahead. If the type is UP or DOWN, + then the ID is not really meaningful as it's fixed--there is + just one UP node and one DOWN navigation node. + + + + + A nil was created (even nil nodes have a unique ID... + they are not "null" per se). As of 4/28/2006, this + seems to be uniquely triggered when starting a new subtree + such as when entering a subrule in automatic mode and when + building a tree in rewrite mode. + + + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only t.ID is set. + + + + + Upon syntax error, recognizers bracket the error with an error node + if they are building ASTs. + + + + + + Announce a new node built from token elements such as type etc... + + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only t.ID, type, text are + set. + + + + Announce a new node built from an existing token. + + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only node.ID and token.tokenIndex + are set. + + + + Make a node the new root of an existing root. See + + + Note: the newRootID parameter is possibly different + than the TreeAdaptor.becomeRoot() newRoot parameter. + In our case, it will always be the result of calling + TreeAdaptor.becomeRoot() and not root_n or whatever. + + The listener should assume that this event occurs + only when the current subrule (or rule) subtree is + being reset to newRootID. + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only IDs are set. + + + + + + Make childID a child of rootID. + + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only IDs are set. + + + + + + Set the token start/stop token index for a subtree root or node. + + + If you are receiving this event over a socket via + RemoteDebugEventSocketListener then only t.ID is set. + + + + A DFA implemented as a set of transition tables. + + + Any state that has a semantic predicate edge is special; those states + are generated with if-then-else structures in a specialStateTransition() + which is generated by cyclicDFA template. + + There are at most 32767 states (16-bit signed short). + Could get away with byte sometimes but would have to generate different + types and the simulation code too. For a point of reference, the Java + lexer's Tokens rule DFA has 326 states roughly. + + + + Which recognizer encloses this DFA? Needed to check backtracking + + + + From the input stream, predict what alternative will succeed + using this DFA (representing the covering regular approximation + to the underlying CFL). Return an alternative number 1..n. Throw + an exception upon error. + + + + A hook for debugging interface + + + + Given a String that has a run-length-encoding of some unsigned shorts + like "\1\2\3\9", convert to short[] {2,9,9,9}. We do this to avoid + static short[] which generates so much init code that the class won't + compile. :( + + + + Hideous duplication of code, but I need different typed arrays out :( + + + The recognizer did not match anything for a (..)+ loop. + + + + A semantic predicate failed during validation. Validation of predicates + occurs when normally parsing the alternative just like matching a token. + Disambiguating predicate evaluation occurs when we hoist a predicate into + a prediction decision. + + + + AST rules have trees + + + Has a value potentially if output=AST; + + + AST rules have trees + + + Has a value potentially if output=AST; + + + A source of characters for an ANTLR lexer + + + + For infinite streams, you don't need this; primarily I'm providing + a useful interface for action code. Just make sure actions don't + use this on streams that don't support it. + + + + + Get the ith character of lookahead. This is the same usually as + LA(i). This will be used for labels in the generated + lexer code. I'd prefer to return a char here type-wise, but it's + probably better to be 32-bit clean and be consistent with LA. + + + + ANTLR tracks the line information automatically + Because this stream can rewind, we need to be able to reset the line + + + The index of the character relative to the beginning of the line 0..n-1 + + + + A simple stream of integers used when all I care about is the char + or token type sequence (such as interpretation). + + + + + Get int at current input pointer + i ahead where i=1 is next int. + Negative indexes are allowed. LA(-1) is previous token (token + just matched). LA(-i) where i is before first token should + yield -1, invalid char / EOF. + + + + + Tell the stream to start buffering if it hasn't already. Return + current input position, Index, or some other marker so that + when passed to rewind() you get back to the same spot. + rewind(mark()) should not affect the input cursor. The Lexer + track line/col info as well as input index so its markers are + not pure input indexes. Same for tree node streams. + + + + + Return the current input symbol index 0..n where n indicates the + last symbol has been read. The index is the symbol about to be + read not the most recently read symbol. + + + + + Reset the stream so that next call to index would return marker. + The marker will usually be Index but it doesn't have to be. It's + just a marker to indicate what state the stream was in. This is + essentially calling release() and seek(). If there are markers + created after this marker argument, this routine must unroll them + like a stack. Assume the state the stream was in when this marker + was created. + + + + + Rewind to the input position of the last marker. + Used currently only after a cyclic DFA and just + before starting a sem/syn predicate to get the + input position back to the start of the decision. + Do not "pop" the marker off the state. mark(i) + and rewind(i) should balance still. It is + like invoking rewind(last marker) but it should not "pop" + the marker off. It's like seek(last marker's input position). + + + + + You may want to commit to a backtrack but don't want to force the + stream to keep bookkeeping objects around for a marker that is + no longer necessary. This will have the same behavior as + rewind() except it releases resources without the backward seek. + This must throw away resources for all markers back to the marker + argument. So if you're nested 5 levels of mark(), and then release(2) + you have to release resources for depths 2..5. + + + + + Set the input cursor to the position indicated by index. This is + normally used to seek ahead in the input stream. No buffering is + required to do this unless you know your stream will use seek to + move backwards such as when backtracking. + + + + This is different from rewind in its multi-directional + requirement and in that its argument is strictly an input cursor (index). + + For char streams, seeking forward must update the stream state such + as line number. For seeking backwards, you will be presumably + backtracking using the mark/rewind mechanism that restores state and + so this method does not need to update state when seeking backwards. + + Currently, this method is only used for efficient backtracking using + memoization, but in the future it may be used for incremental parsing. + + The index is 0..n-1. A seek to position i means that LA(1) will + return the ith symbol. So, seeking to 0 means LA(1) will return the + first element in the stream. + + + + + Only makes sense for streams that buffer everything up probably, but + might be useful to display the entire stream or for testing. This + value includes a single EOF. + + + + + Where are you getting symbols from? Normally, implementations will + pass the buck all the way to the lexer who can ask its input stream + for the file name or whatever. + + + + + Rules can have start/stop info. + + + + + Gets the start element from the input stream + + + + + Gets the stop element from the input stream + + + + + Rules can have start/stop info. + + The element type of the input stream. + + + + Gets the start element from the input stream + + + + + Gets the stop element from the input stream + + + + Get the text of the token + + + The line number on which this token was matched; line=1..n + + + The index of the first character relative to the beginning of the line 0..n-1 + + + + An index from 0..n-1 of the token object in the input stream. + This must be valid in order to use the ANTLRWorks debugger. + + + + + From what character stream was this token created? You don't have to + implement but it's nice to know where a Token comes from if you have + include files etc... on the input. + + + + + A source of tokens must provide a sequence of tokens via nextToken() + and also must reveal it's source of characters; CommonToken's text is + computed from a CharStream; it only store indices into the char stream. + + + + Errors from the lexer are never passed to the parser. Either you want + to keep going or you do not upon token recognition error. If you do not + want to continue lexing then you do not want to continue parsing. Just + throw an exception not under RecognitionException and Java will naturally + toss you all the way out of the recognizers. If you want to continue + lexing then you should not throw an exception to the parser--it has already + requested a token. Keep lexing until you get a valid one. Just report + errors and keep going, looking for a valid token. + + + + + Return a Token object from your input stream (usually a CharStream). + Do not fail/return upon lexing error; keep chewing on the characters + until you get a good one; errors are not passed through to the parser. + + + + + Where are you getting tokens from? normally the implication will simply + ask lexers input stream. + + + + A stream of tokens accessing tokens from a TokenSource + + + Get Token at current input pointer + i ahead where i=1 is next Token. + i<0 indicates tokens in the past. So -1 is previous token and -2 is + two tokens ago. LT(0) is undefined. For i>=n, return Token.EOFToken. + Return null for LT(0) and any index that results in an absolute address + that is negative. + + + + How far ahead has the stream been asked to look? The return + value is a valid index from 0..n-1. + + + + + Get a token at an absolute index i; 0..n-1. This is really only + needed for profiling and debugging and token stream rewriting. + If you don't want to buffer up tokens, then this method makes no + sense for you. Naturally you can't use the rewrite stream feature. + I believe DebugTokenStream can easily be altered to not use + this method, removing the dependency. + + + + + Where is this stream pulling tokens from? This is not the name, but + the object that provides Token objects. + + + + + Return the text of all tokens from start to stop, inclusive. + If the stream does not buffer all the tokens then it can just + return "" or null; Users should not access $ruleLabel.text in + an action of course in that case. + + + + + Because the user is not required to use a token with an index stored + in it, we must provide a means for two token objects themselves to + indicate the start/end location. Most often this will just delegate + to the other toString(int,int). This is also parallel with + the TreeNodeStream.toString(Object,Object). + + + + + The most common stream of tokens is one where every token is buffered up + and tokens are prefiltered for a certain channel (the parser will only + see these tokens and cannot change the filter channel number during the + parse). + + + TODO: how to access the full token stream? How to track all tokens matched per rule? + + + + Record every single token pulled from the source so we can reproduce + chunks of it later. + + + + Map from token type to channel to override some Tokens' channel numbers + + + Set of token types; discard any tokens with this type + + + Skip tokens on any channel but this one; this is how we skip whitespace... + + + By default, track all incoming tokens + + + Track the last mark() call result value for use in rewind(). + + + + The index into the tokens list of the current token (next token + to consume). p==-1 indicates that the tokens list is empty + + + + + How deep have we gone? + + + + Reset this token stream by setting its token source. + + + + Load all tokens from the token source and put in tokens. + This is done upon first LT request because you might want to + set some token type / channel overrides before filling buffer. + + + + + Move the input pointer to the next incoming token. The stream + must become active with LT(1) available. consume() simply + moves the input pointer so that LT(1) points at the next + input symbol. Consume at least one token. + + + + Walk past any token not on the channel the parser is listening to. + + + + Given a starting index, return the index of the first on-channel token. + + + + A simple filter mechanism whereby you can tell this token stream + to force all tokens of type ttype to be on channel. For example, + when interpreting, we cannot exec actions so we need to tell + the stream to force all WS and NEWLINE to be a different, ignored + channel. + + + + + Given a start and stop index, return a List of all tokens in + the token type BitSet. Return null if no tokens were found. This + method looks at both on and off channel tokens. + + + + + Get the ith token from the current position 1..n where k=1 is the + first symbol of lookahead. + + + + Look backwards k tokens on-channel tokens + + + + Return absolute token i; ignore which channel the tokens are on; + that is, count all tokens not just on-channel tokens. + + + + + A lexer is recognizer that draws input symbols from a character stream. + lexer grammars result in a subclass of this object. A Lexer object + uses simplified match() and error recovery mechanisms in the interest + of speed. + + + + Where is the lexer drawing characters from? + + + + Gets or sets the text matched so far for the current token or any text override. + + + Setting this value replaces any previously set value, and overrides the original text. + + + + Return a token from this source; i.e., match a token on the char stream. + + + Returns the EOF token (default), if you need + to return a custom token instead override this method. + + + + Instruct the lexer to skip creating a token for current lexer rule + and look for another token. nextToken() knows to keep looking when + a lexer rule finishes with token set to SKIP_TOKEN. Recall that + if token==null at end of any token rule, it creates one for you + and emits it. + + + + This is the lexer entry point that sets instance var 'token' + + + + Currently does not support multiple emits per nextToken invocation + for efficiency reasons. Subclass and override this method and + nextToken (to push tokens into a list and pull from that list rather + than a single variable as this implementation does). + + + + + The standard method called to automatically emit a token at the + outermost lexical rule. The token object should point into the + char buffer start..stop. If there is a text override in 'text', + use that to set the token's text. Override this method to emit + custom Token objects. + + + + If you are building trees, then you should also override + Parser or TreeParser.getMissingSymbol(). + + + + What is the index of the current character of lookahead? + + + + Lexers can normally match any char in it's vocabulary after matching + a token, so do the easy thing and just kill a character and hope + it all works out. You can instead use the rule invocation stack + to do sophisticated error recovery if you are in a fragment rule. + + + + A queue that can dequeue and get(i) in O(1) and grow arbitrarily large. + A linked list is fast at dequeue but slow at get(i). An array is + the reverse. This is O(1) for both operations. + + List grows until you dequeue last element at end of buffer. Then + it resets to start filling at 0 again. If adds/removes are balanced, the + buffer will not grow too large. + + No iterator stuff as that's not how we'll use it. + + + dynamically-sized buffer of elements + + + index of next element to fill + + + + How deep have we gone? + + + + + Return element {@code i} elements ahead of current element. {@code i==0} + gets current element. This is not an absolute index into {@link #data} + since {@code p} defines the start of the real list. + + + + Get and remove first element in queue + + + Return string of current buffer contents; non-destructive + + + + A lookahead queue that knows how to mark/release locations in the buffer for + backtracking purposes. Any markers force the {@link FastQueue} superclass to + keep all elements until no more markers; then can reset to avoid growing a + huge buffer. + + + + Absolute token index. It's the index of the symbol about to be + read via {@code LT(1)}. Goes from 0 to numtokens. + + + This is the {@code LT(-1)} element for the first element in {@link #data}. + + + Track object returned by nextElement upon end of stream; + Return it later when they ask for LT passed end of input. + + + Track the last mark() call result value for use in rewind(). + + + tracks how deep mark() calls are nested + + + + Implement nextElement to supply a stream of elements to this + lookahead buffer. Return EOF upon end of the stream we're pulling from. + + + + + Get and remove first element in queue; override + {@link FastQueue#remove()}; it's the same, just checks for backtracking. + + + + Make sure we have at least one element to remove, even if EOF + + + + Make sure we have 'need' elements from current position p. Last valid + p index is data.size()-1. p+need-1 is the data index 'need' elements + ahead. If we need 1 element, (p+1-1)==p must be < data.size(). + + + + add n elements to buffer + + + Size of entire stream is unknown; we only know buffer size from FastQueue + + + + Seek to a 0-indexed absolute token index. Normally used to seek backwards + in the buffer. Does not force loading of nodes. + + + To preserve backward compatibility, this method allows seeking past the + end of the currently buffered data. In this case, the input pointer will + be moved but the data will only actually be loaded upon the next call to + {@link #consume} or {@link #LT} for {@code k>0}. + + + + A mismatched char or Token or tree node + + + + We were expecting a token but it's not found. The current token + is actually what we wanted next. Used for tree node errors too. + + + + + A parser for TokenStreams. "parser grammars" result in a subclass + of this. + + + + Gets or sets the token stream; resets the parser upon a set. + + + + Rules that return more than a single value must return an object + containing all the values. Besides the properties defined in + RuleLabelScope.predefinedRulePropertiesScope there may be user-defined + return values. This class simply defines the minimum properties that + are always defined and methods to access the others that might be + available depending on output option such as template and tree. + + + + Note text is not an actual property of the return value, it is computed + from start and stop using the input stream's toString() method. I + could add a ctor to this so that we can pass in and store the input + stream, but I'm not sure we want to do that. It would seem to be undefined + to get the .text property anyway if the rule matches tokens from multiple + input streams. + + I do not use getters for fields of objects that are used simply to + group values such as this aggregate. The getters/setters are there to + satisfy the superclass interface. + + + + The root of the ANTLR exception hierarchy. + + + To avoid English-only error messages and to generally make things + as flexible as possible, these exceptions are not created with strings, + but rather the information necessary to generate an error. Then + the various reporting methods in Parser and Lexer can be overridden + to generate a localized error message. For example, MismatchedToken + exceptions are built with the expected token type. + So, don't expect getMessage() to return anything. + + Note that as of Java 1.4, you can access the stack trace, which means + that you can compute the complete trace of rules from the start symbol. + This gives you considerable context information with which to generate + useful error messages. + + ANTLR generates code that throws exceptions upon recognition error and + also generates code to catch these exceptions in each rule. If you + want to quit upon first error, you can turn off the automatic error + handling mechanism using rulecatch action, but you still need to + override methods mismatch and recoverFromMismatchSet. + + In general, the recognition exceptions can track where in a grammar a + problem occurred and/or what was the expected input. While the parser + knows its state (such as current input symbol and line info) that + state can change before the exception is reported so current token index + is computed and stored at exception time. From this info, you can + perhaps print an entire line of input not just a single token, for example. + Better to just say the recognizer had a problem and then let the parser + figure out a fancy report. + + + + What input stream did the error occur in? + + + + What was the lookahead index when this exception was thrown? + + + + What is index of token/char were we looking at when the error occurred? + + + + The current Token when an error occurred. Since not all streams + can retrieve the ith Token, we have to track the Token object. + For parsers. Even when it's a tree parser, token might be set. + + + + + If this is a tree parser exception, node is set to the node with + the problem. + + + + The current char when an error occurred. For lexers. + + + + Track the line (1-based) at which the error occurred in case this is + generated from a lexer. We need to track this since the + unexpected char doesn't carry the line info. + + + + + The 0-based index into the line where the error occurred. + + + + + If you are parsing a tree node stream, you will encounter som + imaginary nodes w/o line/col info. We now search backwards looking + for most recent token with line/col info, but notify getErrorHeader() + that info is approximate. + + + + Used for remote debugger deserialization + + + Return the token type or char of the unexpected input element + + + + The set of fields needed by an abstract recognizer to recognize input + and recover from errors etc... As a separate state object, it can be + shared among multiple grammars; e.g., when one grammar imports another. + + + + These fields are publically visible but the actual state pointer per + parser is protected. + + + + + Track the set of token types that can follow any rule invocation. + Stack grows upwards. When it hits the max, it grows 2x in size + and keeps going. + + + + + This is true when we see an error and before having successfully + matched a token. Prevents generation of more than one error message + per error. + + + + + The index into the input stream where the last error occurred. + This is used to prevent infinite loops where an error is found + but no token is consumed during recovery...another error is found, + ad naseum. This is a failsafe mechanism to guarantee that at least + one token/tree node is consumed for two errors. + + + + + In lieu of a return value, this indicates that a rule or token + has failed to match. Reset to false upon valid token match. + + + + Did the recognizer encounter a syntax error? Track how many. + + + + If 0, no backtracking is going on. Safe to exec actions etc... + If >0 then it's the level of backtracking. + + + + + An array[size num rules] of dictionaries that tracks + the stop token index for each rule. ruleMemo[ruleIndex] is + the memoization table for ruleIndex. For key ruleStartIndex, you + get back the stop token for associated rule or MEMO_RULE_FAILED. + + + This is only used if rule memoization is on (which it is by default). + + + + The goal of all lexer rules/methods is to create a token object. + This is an instance variable as multiple rules may collaborate to + create a single token. nextToken will return this object after + matching lexer rule(s). If you subclass to allow multiple token + emissions, then set this to the last token to be matched or + something nonnull so that the auto token emit mechanism will not + emit another token. + + + + + What character index in the stream did the current token start at? + Needed, for example, to get the text for current token. Set at + the start of nextToken. + + + + The line on which the first character of the token resides + + + The character position of first character within the line + + + The channel number for the current token + + + The token type for the current token + + + + You can set the text for the current token to override what is in + the input char buffer. Use setText() or can set this instance var. + + + + + All tokens go to the parser (unless skip() is called in that rule) + on a particular "channel". The parser tunes to a particular channel + so that whitespace etc... can go to the parser on a "hidden" channel. + + + + + Anything on different channel than DEFAULT_CHANNEL is not parsed + by parser. + + + + Useful for dumping out the input stream after doing some + augmentation or other manipulations. + + You can insert stuff, replace, and delete chunks. Note that the + operations are done lazily--only if you convert the buffer to a + String. This is very efficient because you are not moving data around + all the time. As the buffer of tokens is converted to strings, the + toString() method(s) check to see if there is an operation at the + current index. If so, the operation is done and then normal String + rendering continues on the buffer. This is like having multiple Turing + machine instruction streams (programs) operating on a single input tape. :) + + Since the operations are done lazily at toString-time, operations do not + screw up the token index values. That is, an insert operation at token + index i does not change the index values for tokens i+1..n-1. + + Because operations never actually alter the buffer, you may always get + the original token stream back without undoing anything. Since + the instructions are queued up, you can easily simulate transactions and + roll back any changes if there is an error just by removing instructions. + For example, + + CharStream input = new ANTLRFileStream("input"); + TLexer lex = new TLexer(input); + TokenRewriteStream tokens = new TokenRewriteStream(lex); + T parser = new T(tokens); + parser.startRule(); + + Then in the rules, you can execute + Token t,u; + ... + input.insertAfter(t, "text to put after t");} + input.insertAfter(u, "text after u");} + System.out.println(tokens.toString()); + + Actually, you have to cast the 'input' to a TokenRewriteStream. :( + + You can also have multiple "instruction streams" and get multiple + rewrites from a single pass over the input. Just name the instruction + streams and use that name again when printing the buffer. This could be + useful for generating a C file and also its header file--all from the + same buffer: + + tokens.insertAfter("pass1", t, "text to put after t");} + tokens.insertAfter("pass2", u, "text after u");} + System.out.println(tokens.toString("pass1")); + System.out.println(tokens.toString("pass2")); + + If you don't use named rewrite streams, a "default" stream is used as + the first example shows. + + + What index into rewrites List are we? + + + Token buffer index. + + + + Execute the rewrite operation by possibly adding to the buffer. + Return the index of the next token to operate on. + + + + + I'm going to try replacing range from x..y with (y-x)+1 ReplaceOp + instructions. + + + + + You may have multiple, named streams of rewrite operations. + I'm calling these things "programs." + Maps String (name) -> rewrite (List) + + + + Map String (program name) -> Integer index + + + + Rollback the instruction stream for a program so that + the indicated instruction (via instructionIndex) is no + longer in the stream. UNTESTED! + + + + Reset the program so that no instructions exist + + + We need to combine operations and report invalid operations (like + overlapping replaces that are not completed nested). Inserts to + same index need to be combined etc... Here are the cases: + + I.i.u I.j.v leave alone, nonoverlapping + I.i.u I.i.v combine: Iivu + + R.i-j.u R.x-y.v | i-j in x-y delete first R + R.i-j.u R.i-j.v delete first R + R.i-j.u R.x-y.v | x-y in i-j ERROR + R.i-j.u R.x-y.v | boundaries overlap ERROR + + Delete special case of replace (text==null): + D.i-j.u D.x-y.v | boundaries overlap combine to max(min)..max(right) + + I.i.u R.x-y.v | i in (x+1)-y delete I (since insert before + we're not deleting i) + I.i.u R.x-y.v | i not in (x+1)-y leave alone, nonoverlapping + R.x-y.v I.i.u | i in x-y ERROR + R.x-y.v I.x.u R.x-y.uv (combine, delete I) + R.x-y.v I.i.u | i not in x-y leave alone, nonoverlapping + + I.i.u = insert u before op @ index i + R.x-y.u = replace x-y indexed tokens with u + + First we need to examine replaces. For any replace op: + + 1. wipe out any insertions before op within that range. + 2. Drop any replace op before that is contained completely within + that range. + 3. Throw exception upon boundary overlap with any previous replace. + + Then we can deal with inserts: + + 1. for any inserts to same index, combine even if not adjacent. + 2. for any prior replace with same left boundary, combine this + insert with replace and delete this replace. + 3. throw exception if index in same range as previous replace + + Don't actually delete; make op null in list. Easier to walk list. + Later we can throw as we add to index -> op map. + + Note that I.2 R.2-2 will wipe out I.2 even though, technically, the + inserted stuff would be before the replace range. But, if you + add tokens in front of a method body '{' and then delete the method + body, I think the stuff before the '{' you added should disappear too. + + Return a map from token index to operation. + + + Get all operations before an index of a particular kind + + + + In an action, a lexer rule can set token to this SKIP_TOKEN and ANTLR + will avoid creating a token for this symbol and try to fetch another. + + + + imaginary tree navigation type; traverse "get child" link + + + imaginary tree navigation type; finish with a child list + + + + A generic tree implementation with no payload. You must subclass to + actually have any user data. ANTLR v3 uses a list of children approach + instead of the child-sibling approach in v2. A flat tree (a list) is + an empty node whose children represent the list. An empty, but + non-null node is called "nil". + + + + + Create a new node from an existing node does nothing for BaseTree + as there are no fields other than the children list, which cannot + be copied as the children are not considered part of this node. + + + + + Get the children internal List; note that if you directly mess with + the list, do so at your own risk. + + + + BaseTree doesn't track parent pointers. + + + BaseTree doesn't track child indexes. + + + Add t as child of this node. + + + Warning: if t has no children, but child does + and child isNil then this routine moves children to t via + t.children = child.children; i.e., without copying the array. + + + + Add all elements of kids list as children of this node + + + Insert child t at child position i (0..n-1) by shifting children + i+1..n-1 to the right one position. Set parent / indexes properly + but does NOT collapse nil-rooted t's that come in here like addChild. + + + + Delete children from start to stop and replace with t even if t is + a list (nil-root tree). num of children can increase or decrease. + For huge child lists, inserting children can force walking rest of + children to set their childindex; could be slow. + + + + Override in a subclass to change the impl of children list + + + Set the parent and child index values for all child of t + + + Walk upwards looking for ancestor with this token type. + + + Walk upwards and get first ancestor with this token type. + + + + Return a list of all ancestors of this node. The first node of + list is the root and the last is the parent of this node. + + + + Print out a whole tree not just a node + + + Override to say how a node (not a tree) should look as text + + + A TreeAdaptor that works with any Tree implementation. + + + + System.identityHashCode() is not always unique; we have to + track ourselves. That's ok, it's only for debugging, though it's + expensive: we have to create a hashtable with all tree nodes in it. + + + + + Create tree node that holds the start and stop tokens associated + with an error. + + + + If you specify your own kind of tree nodes, you will likely have to + override this method. CommonTree returns Token.INVALID_TOKEN_TYPE + if no token payload but you might have to set token type for diff + node type. + + You don't have to subclass CommonErrorNode; you will likely need to + subclass your own tree node class to avoid class cast exception. + + + + + This is generic in the sense that it will work with any kind of + tree (not just ITree interface). It invokes the adaptor routines + not the tree node routines to do the construction. + + + + + Add a child to the tree t. If child is a flat tree (a list), make all + in list children of t. Warning: if t has no children, but child does + and child isNil then you can decide it is ok to move children to t via + t.children = child.children; i.e., without copying the array. Just + make sure that this is consistent with have the user will build + ASTs. + + + + + If oldRoot is a nil root, just copy or move the children to newRoot. + If not a nil root, make oldRoot a child of newRoot. + + + + old=^(nil a b c), new=r yields ^(r a b c) + old=^(a b c), new=r yields ^(r ^(a b c)) + + If newRoot is a nil-rooted single child tree, use the single + child as the new root node. + + old=^(nil a b c), new=^(nil r) yields ^(r a b c) + old=^(a b c), new=^(nil r) yields ^(r ^(a b c)) + + If oldRoot was null, it's ok, just return newRoot (even if isNil). + + old=null, new=r yields r + old=null, new=^(nil r) yields ^(nil r) + + Return newRoot. Throw an exception if newRoot is not a + simple node or nil root with a single child node--it must be a root + node. If newRoot is ^(nil x) return x as newRoot. + + Be advised that it's ok for newRoot to point at oldRoot's + children; i.e., you don't have to copy the list. We are + constructing these nodes so we should have this control for + efficiency. + + + + Transform ^(nil x) to x and nil to null + + + + Tell me how to create a token for use with imaginary token nodes. + For example, there is probably no input symbol associated with imaginary + token DECL, but you need to create it as a payload or whatever for + the DECL node as in ^(DECL type ID). + + + + If you care what the token payload objects' type is, you should + override this method and any other createToken variant. + + + + + Tell me how to create a token for use with imaginary token nodes. + For example, there is probably no input symbol associated with imaginary + token DECL, but you need to create it as a payload or whatever for + the DECL node as in ^(DECL type ID). + + + + This is a variant of createToken where the new token is derived from + an actual real input token. Typically this is for converting '{' + tokens to BLOCK etc... You'll see + + r : lc='{' ID+ '}' -> ^(BLOCK[$lc] ID+) ; + + If you care what the token payload objects' type is, you should + override this method and any other createToken variant. + + + + + Duplicate a node. This is part of the factory; + override if you want another kind of node to be built. + + + + I could use reflection to prevent having to override this + but reflection is slow. + + + + + Track start/stop token for subtree root created for a rule. + Only works with Tree nodes. For rules that match nothing, + seems like this will yield start=i and stop=i-1 in a nil node. + Might be useful info so I'll not force to be i..i. + + + + A buffered stream of tree nodes. Nodes can be from a tree of ANY kind. + + This node stream sucks all nodes out of the tree specified in + the constructor during construction and makes pointers into + the tree using an array of Object pointers. The stream necessarily + includes pointers to DOWN and UP and EOF nodes. + + This stream knows how to mark/release for backtracking. + + This stream is most suitable for tree interpreters that need to + jump around a lot or for tree parsers requiring speed (at cost of memory). + There is some duplicated functionality here with UnBufferedTreeNodeStream + but just in bookkeeping, not tree walking etc... + + TARGET DEVELOPERS: + + This is the old CommonTreeNodeStream that buffered up entire node stream. + No need to implement really as new CommonTreeNodeStream is much better + and covers what we need. + + @see CommonTreeNodeStream + + + The complete mapping from stream index to tree node. + This buffer includes pointers to DOWN, UP, and EOF nodes. + It is built upon ctor invocation. The elements are type + Object as we don't what the trees look like. + + Load upon first need of the buffer so we can set token types + of interest for reverseIndexing. Slows us down a wee bit to + do all of the if p==-1 testing everywhere though. + + + Pull nodes from which tree? + + + IF this tree (root) was created from a token stream, track it. + + + What tree adaptor was used to build these trees + + + Reuse same DOWN, UP navigation nodes unless this is true + + + The index into the nodes list of the current node (next node + to consume). If -1, nodes array not filled yet. + + + Track the last mark() call result value for use in rewind(). + + + Stack of indexes used for push/pop calls + + + Walk tree with depth-first-search and fill nodes buffer. + Don't do DOWN, UP nodes if its a list (t is isNil). + + + What is the stream index for node? 0..n-1 + Return -1 if node not found. + + + As we flatten the tree, we use UP, DOWN nodes to represent + the tree structure. When debugging we need unique nodes + so instantiate new ones when uniqueNavigationNodes is true. + + + Look backwards k nodes + + + + Make stream jump to a new location, saving old location. + Switch back with pop(). + + + + + Seek back to previous index saved during last push() call. + Return top of stack (return index). + + + + Used for testing, just return the token type stream + + + Debugging + + + A node representing erroneous token range in token stream + + + + A tree node that is wrapper for a Token object. After 3.0 release + while building tree rewrite stuff, it became clear that computing + parent and child index is very difficult and cumbersome. Better to + spend the space in every tree node. If you don't want these extra + fields, it's easy to cut them out in your own BaseTree subclass. + + + + A single token is the payload + + + + What token indexes bracket all tokens associated with this node + and below? + + + + Who is the parent node of this node; if null, implies node is root + + + What index is this node in the child list? Range: 0..n-1 + + + + For every node in this subtree, make sure it's start/stop token's + are set. Walk depth first, visit bottom up. Only updates nodes + with at least one token index < 0. + + + + + A TreeAdaptor that works with any Tree implementation. It provides + really just factory methods; all the work is done by BaseTreeAdaptor. + If you would like to have different tokens created than ClassicToken + objects, you need to override this and then set the parser tree adaptor to + use your subclass. + + + + To get your parser to build nodes of a different type, override + create(Token), errorNode(), and to be safe, YourTreeClass.dupNode(). + dupNode is called to duplicate nodes during rewrite operations. + + + + + Tell me how to create a token for use with imaginary token nodes. + For example, there is probably no input symbol associated with imaginary + token DECL, but you need to create it as a payload or whatever for + the DECL node as in ^(DECL type ID). + + + + If you care what the token payload objects' type is, you should + override this method and any other createToken variant. + + + + + Tell me how to create a token for use with imaginary token nodes. + For example, there is probably no input symbol associated with imaginary + token DECL, but you need to create it as a payload or whatever for + the DECL node as in ^(DECL type ID). + + + + This is a variant of createToken where the new token is derived from + an actual real input token. Typically this is for converting '{' + tokens to BLOCK etc... You'll see + + r : lc='{' ID+ '}' -> ^(BLOCK[$lc] ID+) ; + + If you care what the token payload objects' type is, you should + override this method and any other createToken variant. + + + + + What is the Token associated with this node? If + you are not using CommonTree, then you must + override this in your own adaptor. + + + + Pull nodes from which tree? + + + If this tree (root) was created from a token stream, track it. + + + What tree adaptor was used to build these trees + + + The tree iterator we are using + + + Stack of indexes used for push/pop calls + + + Tree (nil A B C) trees like flat A B C streams + + + Tracks tree depth. Level=0 means we're at root node level. + + + Tracks the last node before the start of {@link #data} which contains + position information to provide information for error reporting. This is + tracked in addition to {@link #prevElement} which may or may not contain + position information. + + @see #hasPositionInformation + @see RecognitionException#extractInformationFromTreeNodeStream + + + Make stream jump to a new location, saving old location. + Switch back with pop(). + + + Seek back to previous index saved during last push() call. + Return top of stack (return index). + + + Returns an element containing position information. If {@code allowApproximateLocation} is {@code false}, then + this method will return the {@code LT(1)} element if it contains position information, and otherwise return {@code null}. + If {@code allowApproximateLocation} is {@code true}, then this method will return the last known element containing position information. + + @see #hasPositionInformation + + + For debugging; destructive: moves tree iterator to end. + + + A utility class to generate DOT diagrams (graphviz) from + arbitrary trees. You can pass in your own templates and + can pass in any kind of tree or use Tree interface method. + I wanted this separator so that you don't have to include + ST just to use the org.antlr.runtime.tree.* package. + This is a set of non-static methods so you can subclass + to override. For example, here is an invocation: + + CharStream input = new ANTLRInputStream(System.in); + TLexer lex = new TLexer(input); + CommonTokenStream tokens = new CommonTokenStream(lex); + TParser parser = new TParser(tokens); + TParser.e_return r = parser.e(); + Tree t = (Tree)r.tree; + System.out.println(t.toStringTree()); + DOTTreeGenerator gen = new DOTTreeGenerator(); + StringTemplate st = gen.toDOT(t); + System.out.println(st); + + + Track node to number mapping so we can get proper node name back + + + Track node number so we can get unique node names + + + Generate DOT (graphviz) for a whole tree not just a node. + For example, 3+4*5 should generate: + + digraph { + node [shape=plaintext, fixedsize=true, fontsize=11, fontname="Courier", + width=.4, height=.2]; + edge [arrowsize=.7] + "+"->3 + "+"->"*" + "*"->4 + "*"->5 + } + + Takes a Tree interface object. + + + + @author Sam Harwell + + + Returns an element containing concrete information about the current + position in the stream. + + @param allowApproximateLocation if {@code false}, this method returns + {@code null} if an element containing exact information about the current + position is not available + + + Determines if the specified {@code element} contains concrete position + information. + + @param element the element to check + @return {@code true} if {@code element} contains concrete position + information, otherwise {@code false} + + + + What does a tree look like? ANTLR has a number of support classes + such as CommonTreeNodeStream that work on these kinds of trees. You + don't have to make your trees implement this interface, but if you do, + you'll be able to use more support code. + + + + NOTE: When constructing trees, ANTLR can build any kind of tree; it can + even use Token objects as trees if you add a child list to your tokens. + + This is a tree node without any payload; just navigation and factory stuff. + + + + Is there is a node above with token type ttype? + + + Walk upwards and get first ancestor with this token type. + + + + Return a list of all ancestors of this node. The first node of + list is the root and the last is the parent of this node. + + + + This node is what child index? 0..n-1 + + + Set the parent and child index values for all children + + + + Add t as a child to this node. If t is null, do nothing. If t + is nil, add all children of t to this' children. + + + + Set ith child (0..n-1) to t; t must be non-null and non-nil node + + + + Delete children from start to stop and replace with t even if t is + a list (nil-root tree). num of children can increase or decrease. + For huge child lists, inserting children can force walking rest of + children to set their childindex; could be slow. + + + + + Indicates the node is a nil node but may still have children, meaning + the tree is a flat list. + + + + + What is the smallest token index (indexing from 0) for this node + and its children? + + + + + What is the largest token index (indexing from 0) for this node + and its children? + + + + Return a token type; needed for tree parsing + + + In case we don't have a token payload, what is the line for errors? + + + + How to create and navigate trees. Rather than have a separate factory + and adaptor, I've merged them. Makes sense to encapsulate. + + + + This takes the place of the tree construction code generated in the + generated code in 2.x and the ASTFactory. + + I do not need to know the type of a tree at all so they are all + generic Objects. This may increase the amount of typecasting needed. :( + + + + + Create a tree node from Token object; for CommonTree type trees, + then the token just becomes the payload. This is the most + common create call. + + + + Override if you want another kind of node to be built. + + + + + Create a new node derived from a token, with a new token type. + This is invoked from an imaginary node ref on right side of a + rewrite rule as IMAG[$tokenLabel]. + + + + This should invoke createToken(Token). + + + + + Same as create(tokenType,fromToken) except set the text too. + This is invoked from an imaginary node ref on right side of a + rewrite rule as IMAG[$tokenLabel, "IMAG"]. + + + + This should invoke createToken(Token). + + + + + Same as create(fromToken) except set the text too. + This is invoked when the text terminal option is set, as in + IMAG<text='IMAG'>. + + + + This should invoke createToken(Token). + + + + + Create a new node derived from a token, with a new token type. + This is invoked from an imaginary node ref on right side of a + rewrite rule as IMAG["IMAG"]. + + + + This should invoke createToken(int,String). + + + + Duplicate a single tree node. + Override if you want another kind of node to be built. + + + Duplicate tree recursively, using dupNode() for each node + + + + Return a nil node (an empty but non-null node) that can hold + a list of element as the children. If you want a flat tree (a list) + use "t=adaptor.nil(); t.addChild(x); t.addChild(y);" + + + + + Return a tree node representing an error. This node records the + tokens consumed during error recovery. The start token indicates the + input symbol at which the error was detected. The stop token indicates + the last symbol consumed during recovery. + + + + You must specify the input stream so that the erroneous text can + be packaged up in the error node. The exception could be useful + to some applications; default implementation stores ptr to it in + the CommonErrorNode. + + This only makes sense during token parsing, not tree parsing. + Tree parsing should happen only when parsing and tree construction + succeed. + + + + Is tree considered a nil node used to make lists of child nodes? + + + + Add a child to the tree t. If child is a flat tree (a list), make all + in list children of t. Warning: if t has no children, but child does + and child isNil then you can decide it is ok to move children to t via + t.children = child.children; i.e., without copying the array. Just + make sure that this is consistent with have the user will build + ASTs. Do nothing if t or child is null. + + + + + If oldRoot is a nil root, just copy or move the children to newRoot. + If not a nil root, make oldRoot a child of newRoot. + + + + old=^(nil a b c), new=r yields ^(r a b c) + old=^(a b c), new=r yields ^(r ^(a b c)) + + If newRoot is a nil-rooted single child tree, use the single + child as the new root node. + + old=^(nil a b c), new=^(nil r) yields ^(r a b c) + old=^(a b c), new=^(nil r) yields ^(r ^(a b c)) + + If oldRoot was null, it's ok, just return newRoot (even if isNil). + + old=null, new=r yields r + old=null, new=^(nil r) yields ^(nil r) + + Return newRoot. Throw an exception if newRoot is not a + simple node or nil root with a single child node--it must be a root + node. If newRoot is ^(nil x) return x as newRoot. + + Be advised that it's ok for newRoot to point at oldRoot's + children; i.e., you don't have to copy the list. We are + constructing these nodes so we should have this control for + efficiency. + + + + + Given the root of the subtree created for this rule, post process + it to do any simplifications or whatever you want. A required + behavior is to convert ^(nil singleSubtree) to singleSubtree + as the setting of start/stop indexes relies on a single non-nil root + for non-flat trees. + + + + Flat trees such as for lists like "idlist : ID+ ;" are left alone + unless there is only one ID. For a list, the start/stop indexes + are set in the nil node. + + This method is executed after all rule tree construction and right + before setTokenBoundaries(). + + + + For identifying trees. + + + How to identify nodes so we can say "add node to a prior node"? + Even becomeRoot is an issue. Use System.identityHashCode(node) + usually. + + + + + Create a node for newRoot make it the root of oldRoot. + If oldRoot is a nil root, just copy or move the children to newRoot. + If not a nil root, make oldRoot a child of newRoot. + + + + Return node created for newRoot. + + + + Be advised: when debugging ASTs, the DebugTreeAdaptor manually + calls create(Token child) and then plain becomeRoot(node, node) + because it needs to trap calls to create, but it can't since it delegates + to not inherits from the TreeAdaptor. + + + + For tree parsing, I need to know the token type of a node + + + Node constructors can set the type of a node + + + Node constructors can set the text of a node + + + + Return the token object from which this node was created. + Currently used only for printing an error message. + The error display routine in BaseRecognizer needs to + display where the input the error occurred. If your + tree of limitation does not store information that can + lead you to the token, you can create a token filled with + the appropriate information and pass that back. See + BaseRecognizer.getErrorMessage(). + + + + + Where are the bounds in the input token stream for this node and + all children? Each rule that creates AST nodes will call this + method right before returning. Flat trees (i.e., lists) will + still usually have a nil root node just to hold the children list. + That node would contain the start/stop indexes then. + + + + Get the token start index for this subtree; return -1 if no such index + + + Get the token stop index for this subtree; return -1 if no such index + + + Get a child 0..n-1 node + + + Set ith child (0..n-1) to t; t must be non-null and non-nil node + + + Remove ith child and shift children down from right. + + + How many children? If 0, then this is a leaf node + + + + Who is the parent node of this node; if null, implies node is root. + If your node type doesn't handle this, it's ok but the tree rewrites + in tree parsers need this functionality. + + + + + What index is this node in the child list? Range: 0..n-1 + If your node type doesn't handle this, it's ok but the tree rewrites + in tree parsers need this functionality. + + + + + Replace from start to stop child index of parent with t, which might + be a list. Number of children may be different after this call. + + + + If parent is null, don't do anything; must be at root of overall tree. + Can't replace whatever points to the parent externally. Do nothing. + + + + A stream of tree nodes, accessing nodes from a tree of some kind + + + + Get a tree node at an absolute index i; 0..n-1. + If you don't want to buffer up nodes, then this method makes no + sense for you. + + + + + Get tree node at current input pointer + ahead where + ==1 is next node. <0 indicates nodes in the past. So + {@code LT(-1)} is previous node, but implementations are not required to + provide results for < -1. {@code LT(0)} is undefined. For + <=n, return . Return for {@code LT(0)} + and any index that results in an absolute address that is negative. + + + + This is analogous to , but this returns a tree node + instead of a . Makes code generation identical for both + parser and tree grammars. + + + + + Where is this stream pulling nodes from? This is not the name, but + the object that provides node objects. + + + + + If the tree associated with this stream was created from a + {@link TokenStream}, you can specify it here. Used to do rule + {@code $text} attribute in tree parser. Optional unless you use tree + parser rule {@code $text} attribute or {@code output=template} and + {@code rewrite=true} options. + + + + + What adaptor can tell me how to interpret/navigate nodes and + trees. E.g., get text of a node. + + + + + As we flatten the tree, we use {@link Token#UP}, {@link Token#DOWN} nodes + to represent the tree structure. When debugging we need unique nodes so + we have to instantiate new ones. When doing normal tree parsing, it's + slow and a waste of memory to create unique navigation nodes. Default + should be {@code false}. + + + + + Return the text of all nodes from {@code start} to {@code stop}, + inclusive. If the stream does not buffer all the nodes then it can still + walk recursively from start until stop. You can always return + {@code null} or {@code ""} too, but users should not access + {@code $ruleLabel.text} in an action of course in that case. + + + + + Replace children of {@code parent} from index {@code startChildIndex} to + {@code stopChildIndex} with {@code t}, which might be a list. Number of + children may be different after this call. The stream is notified because + it is walking the tree and might need to know you are monkeying with the + underlying tree. Also, it might be able to modify the node stream to + avoid restreaming for future phases. + + + + If {@code parent} is {@code null}, don't do anything; must be at root of + overall tree. Can't replace whatever points to the parent externally. Do + nothing. + + + + + How to execute code for node t when a visitor visits node t. Execute + pre() before visiting children and execute post() after visiting children. + + + + + Execute an action before visiting children of t. Return t or + a rewritten t. It is up to the visitor to decide what to do + with the return value. Children of returned value will be + visited if using TreeVisitor.visit(). + + + + + Execute an action after visiting children of t. Return t or + a rewritten t. It is up to the visitor to decide what to do + with the return value. + + + + + A record of the rules used to match a token sequence. The tokens + end up as the leaves of this tree and rule nodes are the interior nodes. + This really adds no functionality, it is just an alias for CommonTree + that is more meaningful (specific) and holds a String to display for a node. + + + + + Emit a token and all hidden nodes before. EOF node holds all + hidden tokens after last real token. + + + + + Print out the leaves of this tree, which means printing original + input back out. + + + + + Base class for all exceptions thrown during AST rewrite construction. + This signifies a case where the cardinality of two or more elements + in a subrule are different: (ID INT)+ where |ID|!=|INT| + + + + No elements within a (...)+ in a rewrite rule + + + Ref to ID or expr but no tokens in ID stream or subtrees in expr stream + + + + A generic list of elements tracked in an alternative to be used in + a -> rewrite rule. We need to subclass to fill in the next() method, + which returns either an AST node wrapped around a token payload or + an existing subtree. + + + + Once you start next()ing, do not try to add more elements. It will + break the cursor tracking I believe. + + TODO: add mechanism to detect/puke on modification after reading from stream + + + + + + + + Cursor 0..n-1. If singleElement!=null, cursor is 0 until you next(), + which bumps it to 1 meaning no more elements. + + + + Track single elements w/o creating a list. Upon 2nd add, alloc list + + + The list of tokens or subtrees we are tracking + + + Once a node / subtree has been used in a stream, it must be dup'd + from then on. Streams are reset after subrules so that the streams + can be reused in future subrules. So, reset must set a dirty bit. + If dirty, then next() always returns a dup. + + + The element or stream description; usually has name of the token or + rule reference that this list tracks. Can include rulename too, but + the exception would track that info. + + + Create a stream with one element + + + Create a stream, but feed off an existing list + + + + Reset the condition of this stream so that it appears we have + not consumed any of its elements. Elements themselves are untouched. + Once we reset the stream, any future use will need duplicates. Set + the dirty bit. + + + + + Return the next element in the stream. If out of elements, throw + an exception unless size()==1. If size is 1, then return elements[0]. + Return a duplicate node/subtree if stream is out of elements and + size==1. If we've already used the element, dup (dirty bit set). + + + + + Do the work of getting the next element, making sure that it's + a tree node or subtree. Deal with the optimization of single- + element list versus list of size > 1. Throw an exception + if the stream is empty or we're out of elements and size>1. + protected so you can override in a subclass if necessary. + + + + + When constructing trees, sometimes we need to dup a token or AST + subtree. Dup'ing a token means just creating another AST node + around it. For trees, you must call the adaptor.dupTree() unless + the element is for a tree root; then it must be a node dup. + + + + + Ensure stream emits trees; tokens must be converted to AST nodes. + AST nodes can be passed through unmolested. + + + + + Queues up nodes matched on left side of -> in a tree parser. This is + the analog of RewriteRuleTokenStream for normal parsers. + + + + Create a stream with one element + + + Create a stream, but feed off an existing list + + + Create a stream with one element + + + Create a stream, but feed off an existing list + + + + Treat next element as a single node even if it's a subtree. + This is used instead of next() when the result has to be a + tree root node. Also prevents us from duplicating recently-added + children; e.g., ^(type ID)+ adds ID to type and then 2nd iteration + must dup the type node, but ID has been added. + + + + Referencing a rule result twice is ok; dup entire tree as + we can't be adding trees as root; e.g., expr expr. + + Hideous code duplication here with super.next(). Can't think of + a proper way to refactor. This needs to always call dup node + and super.next() doesn't know which to call: dup node or dup tree. + + + + Create a stream with one element + + + Create a stream, but feed off an existing list + + + Get next token from stream and make a node for it + + + + Don't convert to a tree unless they explicitly call nextTree. + This way we can do hetero tree nodes in rewrite. + + + + Return a node stream from a doubly-linked tree whose nodes + know what child index they are. No remove() is supported. + + Emit navigation nodes (DOWN, UP, and EOF) to let show tree structure. + + + If we emit UP/DOWN nodes, we need to spit out multiple nodes per + next() call. + + + + A parser for a stream of tree nodes. "tree grammars" result in a subclass + of this. All the error reporting and recovery is shared with Parser via + the BaseRecognizer superclass. + + + + Set the input stream + + + + Match '.' in tree parser has special meaning. Skip node or + entire tree if node has children. If children, scan until + corresponding UP node. + + + + + We have DOWN/UP nodes in the stream that have no line info; override. + plus we want to alter the exception type. Don't try to recover + from tree parser errors inline... + + + + + Prefix error message with the grammar name because message is + always intended for the programmer because the parser built + the input tree not the user. + + + + + Tree parsers parse nodes they usually have a token object as + payload. Set the exception token and do the default behavior. + + + + The tree pattern to lex like "(A B C)" + + + Index into input string + + + Current char + + + How long is the pattern in char? + + + Set when token type is ID or ARG (name mimics Java's StreamTokenizer) + + + Override this if you need transformation tracing to go somewhere + other than stdout or if you're not using ITree-derived trees. + + + + This is identical to the ParserRuleReturnScope except that + the start property is a tree nodes not Token object + when you are parsing trees. + + + + Gets the first node or root node of tree matched for this rule. + + + Do a depth first walk of a tree, applying pre() and post() actions as we go. + + + + Visit every node in tree t and trigger an action for each node + before/after having visited all of its children. Bottom up walk. + Execute both actions even if t has no children. Ignore return + results from transforming children since they will have altered + the child list of this node (their parent). Return result of + applying post action to this node. + + + + + Build and navigate trees with this object. Must know about the names + of tokens so you have to pass in a map or array of token names (from which + this class can build the map). I.e., Token DECL means nothing unless the + class can translate it to a token type. + + + + In order to create nodes and navigate, this class needs a TreeAdaptor. + + This class can build a token type -> node index for repeated use or for + iterating over the various nodes with a particular type. + + This class works in conjunction with the TreeAdaptor rather than moving + all this functionality into the adaptor. An adaptor helps build and + navigate trees using methods. This class helps you do it with string + patterns like "(A B C)". You can create a tree from that pattern or + match subtrees against it. + + + + + When using %label:TOKENNAME in a tree for parse(), we must + track the label. + + + + This adaptor creates TreePattern objects for use during scan() + + + + Compute a Map<String, Integer> that is an inverted index of + tokenNames (which maps int token types to names). + + + + Using the map of token names to token types, return the type. + + + + Walk the entire tree and make a node name to nodes mapping. + For now, use recursion but later nonrecursive version may be + more efficient. Returns Map<Integer, List> where the List is + of your AST node type. The Integer is the token type of the node. + + + + TODO: save this index so that find and visit are faster + + + + Do the work for index + + + Return a List of tree nodes with token type ttype + + + Return a List of subtrees matching pattern. + + + + Visit every ttype node in t, invoking the visitor. This is a quicker + version of the general visit(t, pattern) method. The labels arg + of the visitor action method is never set (it's null) since using + a token type rather than a pattern doesn't let us set a label. + + + + Do the recursive work for visit + + + + For all subtrees that match the pattern, execute the visit action. + The implementation uses the root node of the pattern in combination + with visit(t, ttype, visitor) so nil-rooted patterns are not allowed. + Patterns with wildcard roots are also not allowed. + + + + + Given a pattern like (ASSIGN %lhs:ID %rhs:.) with optional labels + on the various nodes and '.' (dot) as the node/subtree wildcard, + return true if the pattern matches and fill the labels Map with + the labels pointing at the appropriate nodes. Return false if + the pattern is malformed or the tree does not match. + + + + If a node specifies a text arg in pattern, then that must match + for that node in t. + + TODO: what's a better way to indicate bad pattern? Exceptions are a hassle + + + + + Do the work for parse. Check to see if the t2 pattern fits the + structure and token types in t1. Check text if the pattern has + text arguments on nodes. Fill labels map with pointers to nodes + in tree matched against nodes in pattern with labels. + + + + + Create a tree or node from the indicated tree pattern that closely + follows ANTLR tree grammar tree element syntax: + + (root child1 ... child2). + + + + You can also just pass in a node: ID + + Any node can have a text argument: ID[foo] + (notice there are no quotes around foo--it's clear it's a string). + + nil is a special name meaning "give me a nil node". Useful for + making lists: (nil A B C) is a list of A B C. + + + + + Compare t1 and t2; return true if token types/text, structure match exactly. + The trees are examined in their entirety so that (A B) does not match + (A B C) nor (A (B C)). + + + + TODO: allow them to pass in a comparator + TODO: have a version that is nonstatic so it can use instance adaptor + + I cannot rely on the tree node's equals() implementation as I make + no constraints at all on the node types nor interface etc... + + + + + Compare type, structure, and text of two trees, assuming adaptor in + this instance of a TreeWizard. + + + + A token stream that pulls tokens from the code source on-demand and + without tracking a complete buffer of the tokens. This stream buffers + the minimum number of tokens possible. It's the same as + OnDemandTokenStream except that OnDemandTokenStream buffers all tokens. + + You can't use this stream if you pass whitespace or other off-channel + tokens to the parser. The stream can't ignore off-channel tokens. + + You can only look backwards 1 token: LT(-1). + + Use this when you need to read from a socket or other infinite stream. + + @see BufferedTokenStream + @see CommonTokenStream + + + Skip tokens on any channel but this one; this is how we skip whitespace... + + + An extra token while parsing a TokenStream + + + diff --git a/nhibernateg7/packages/Iesi.Collections.4.0.4/.signature.p7s b/nhibernateg7/packages/Iesi.Collections.4.0.4/.signature.p7s new file mode 100644 index 0000000..fa0159d Binary files /dev/null and b/nhibernateg7/packages/Iesi.Collections.4.0.4/.signature.p7s differ diff --git a/nhibernateg7/packages/Iesi.Collections.4.0.4/Iesi.Collections.4.0.4.nupkg b/nhibernateg7/packages/Iesi.Collections.4.0.4/Iesi.Collections.4.0.4.nupkg new file mode 100644 index 0000000..03c3a78 Binary files /dev/null and b/nhibernateg7/packages/Iesi.Collections.4.0.4/Iesi.Collections.4.0.4.nupkg differ diff --git a/nhibernateg7/packages/Iesi.Collections.4.0.4/lib/net40/Iesi.Collections.dll b/nhibernateg7/packages/Iesi.Collections.4.0.4/lib/net40/Iesi.Collections.dll new file mode 100644 index 0000000..09c1136 Binary files /dev/null and b/nhibernateg7/packages/Iesi.Collections.4.0.4/lib/net40/Iesi.Collections.dll differ diff --git a/nhibernateg7/packages/Iesi.Collections.4.0.4/lib/net40/Iesi.Collections.xml b/nhibernateg7/packages/Iesi.Collections.4.0.4/lib/net40/Iesi.Collections.xml new file mode 100644 index 0000000..b3d4d8c --- /dev/null +++ b/nhibernateg7/packages/Iesi.Collections.4.0.4/lib/net40/Iesi.Collections.xml @@ -0,0 +1,552 @@ + + + + Iesi.Collections + + + + + Implementation of ISet that also maintains a linked list over all elements. + Enumeration of this set is guaranteed to return the elements in the order + they were added. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Adds an item to the . + + The object to add to the .The is read-only. + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets a value indicating whether the is read-only. + + + true if the is read-only; otherwise, false. + + + + + Removes all items from the . + + The is read-only. + + + + Determines whether the contains a specific value. + + + true if is found in the ; otherwise, false. + + The object to locate in the . + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.The zero-based index in at which copying begins. is null. is less than 0. is multidimensional.-or-The number of elements in the source is greater than the available space from to the end of the destination .-or-Type cannot be cast automatically to the type of the destination . + + + + Removes the first occurrence of a specific object from the . + + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + The object to remove from the .The is read-only. + + + + Modifies the current set so that it contains all elements that are present in either the current set or the specified collection. + + The collection to compare to the current set. is null. + + + + Modifies the current set so that it contains only elements that are also in a specified collection. + + The collection to compare to the current set. is null. + + + + Removes all elements in the specified collection from the current set. + + The collection of items to remove from the set. is null. + + + + Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both. + + The collection to compare to the current set. is null. + + + + Determines whether a set is a subset of a specified collection. + + + true if the current set is a subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a superset of a specified collection. + + + true if the current set is a superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a correct superset of a specified collection. + + + true if the object is a correct superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a proper (strict) subset of a specified collection. + + + true if the current set is a correct subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set overlaps with the specified collection. + + + true if the current set and share at least one common element; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set and the specified collection contain the same elements. + + + true if the current set is equal to ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Adds an element to the current set and returns a value to indicate if the element was successfully added. + + + true if the element is added to the set; false if the element is already in the set. + + The element to add to the set. + + + + Count the elements in the given collection and determine both the total + count and how many of the elements that are present in the current set. + + + + + Cast the given collection to an ISet<T> if possible. If not, + return a new set containing the items. + + + + + Unlink a node from the linked list by updating the node pointers in + its preceeding and subsequent node. Also update the _first and _last + pointers if necessary. + + + + +

Implements a read-only Set wrapper.

+

Although this is advertised as immutable, it really isn't. Anyone with access to the + wrapped set can still change the set.

+
+
+ + + Constructs an immutable (read-only) Set wrapper. + + The Set that is wrapped. + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Adds an item to the . + + The object to add to the . + is always thrown + + + + Removes all items from the . + + is always thrown + + + + Determines whether the contains a specific value. + + + true if is found in the ; otherwise, false. + + The object to locate in the . + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.The zero-based index in at which copying begins. is null. is less than 0. is multidimensional.-or-The number of elements in the source is greater than the available space from to the end of the destination .-or-Type cannot be cast automatically to the type of the destination . + + + + Removes the first occurrence of a specific object from the . + + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + The object to remove from the . + is always thrown + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets a value indicating whether the is read-only. + + + True. + + + + + Adds an element to the current set and returns a value to indicate if the element was successfully added. + + + true if the element is added to the set; false if the element is already in the set. + + The element to add to the set. + is always thrown + + + + Modifies the current set so that it contains all elements that are present in both the current set and in the specified collection. + + The collection to compare to the current set. is null. + is always thrown + + + + Modifies the current set so that it contains only elements that are also in a specified collection. + + The collection to compare to the current set. is null. + is always thrown + + + + Removes all elements in the specified collection from the current set. + + The collection of items to remove from the set. is null. + is always thrown + + + + Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both. + + The collection to compare to the current set. is null. + is always thrown + + + + Determines whether a set is a subset of a specified collection. + + + true if the current set is a subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a superset of a specified collection. + + + true if the current set is a superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a correct superset of a specified collection. + + + true if the object is a correct superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a property (strict) subset of a specified collection. + + + true if the current set is a correct subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set overlaps with the specified collection. + + + true if the current set and share at least one common element; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set and the specified collection contain the same elements. + + + true if the current set is equal to ; otherwise, false. + + The collection to compare to the current set. is null. + + + +

Implements a thread-safe Set wrapper. The implementation is extremely conservative, + serializing critical sections to prevent possible deadlocks, and locking on everything. + The one exception is for enumeration, which is inherently not thread-safe. For this, you + have to lock the SyncRoot object for the duration of the enumeration.

+
+
+ + + Constructs a thread-safe ISet wrapper. + + The Set object that this object will wrap. + + + + Adds an item to the . + + The object to add to the .The is read-only. + + + + Removes all items from the . + + The is read-only. + + + + Determines whether the contains a specific value. + + + true if is found in the ; otherwise, false. + + The object to locate in the . + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.The zero-based index in at which copying begins. is null. is less than 0. is multidimensional.-or-The number of elements in the source is greater than the available space from to the end of the destination .-or-Type cannot be cast automatically to the type of the destination . + + + + Removes the first occurrence of a specific object from the . + + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + The object to remove from the .The is read-only. + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets a value indicating whether the is read-only. + + + true if the is read-only; otherwise, false. + + + + + Modifies the current set so that it contains all elements that are present in either the current set or in the specified collection. + + The collection to compare to the current set. is null. + + + + Modifies the current set so that it contains only elements that are also in a specified collection. + + The collection to compare to the current set. is null. + + + + Removes all elements in the specified collection from the current set. + + The collection of items to remove from the set. is null. + + + + Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both. + + The collection to compare to the current set. is null. + + + + Determines whether a set is a subset of a specified collection. + + + true if the current set is a subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a superset of a specified collection. + + + true if the current set is a superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a correct superset of a specified collection. + + + true if the object is a correct superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a property (strict) subset of a specified collection. + + + true if the current set is a correct subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set overlaps with the specified collection. + + + true if the current set and share at least one common element; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set and the specified collection contain the same elements. + + + true if the current set is equal to ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Adds an element to the current set and returns a value to indicate if the element was successfully added. + + + true if the element is added to the set; false if the element is already in the set. + + The element to add to the set. + + + + Returns an enumerator that iterates through a collection. Enumeration is inherently not + thread-safe. Use a lock on the SyncRoot to synchronize the entire enumeration process. + + + An object that can be used to iterate through the collection. + + 2 + + + + Returns an enumerator that iterates through the collection. Enumeration is inherently not + thread-safe. Use a lock on the SyncRoot to synchronize the entire enumeration process. + + + A that can be used to iterate through the collection. + + 1 + +
+
diff --git a/nhibernateg7/packages/Iesi.Collections.4.0.4/lib/net461/Iesi.Collections.dll b/nhibernateg7/packages/Iesi.Collections.4.0.4/lib/net461/Iesi.Collections.dll new file mode 100644 index 0000000..c35d072 Binary files /dev/null and b/nhibernateg7/packages/Iesi.Collections.4.0.4/lib/net461/Iesi.Collections.dll differ diff --git a/nhibernateg7/packages/Iesi.Collections.4.0.4/lib/net461/Iesi.Collections.xml b/nhibernateg7/packages/Iesi.Collections.4.0.4/lib/net461/Iesi.Collections.xml new file mode 100644 index 0000000..b3d4d8c --- /dev/null +++ b/nhibernateg7/packages/Iesi.Collections.4.0.4/lib/net461/Iesi.Collections.xml @@ -0,0 +1,552 @@ + + + + Iesi.Collections + + + + + Implementation of ISet that also maintains a linked list over all elements. + Enumeration of this set is guaranteed to return the elements in the order + they were added. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Adds an item to the . + + The object to add to the .The is read-only. + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets a value indicating whether the is read-only. + + + true if the is read-only; otherwise, false. + + + + + Removes all items from the . + + The is read-only. + + + + Determines whether the contains a specific value. + + + true if is found in the ; otherwise, false. + + The object to locate in the . + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.The zero-based index in at which copying begins. is null. is less than 0. is multidimensional.-or-The number of elements in the source is greater than the available space from to the end of the destination .-or-Type cannot be cast automatically to the type of the destination . + + + + Removes the first occurrence of a specific object from the . + + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + The object to remove from the .The is read-only. + + + + Modifies the current set so that it contains all elements that are present in either the current set or the specified collection. + + The collection to compare to the current set. is null. + + + + Modifies the current set so that it contains only elements that are also in a specified collection. + + The collection to compare to the current set. is null. + + + + Removes all elements in the specified collection from the current set. + + The collection of items to remove from the set. is null. + + + + Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both. + + The collection to compare to the current set. is null. + + + + Determines whether a set is a subset of a specified collection. + + + true if the current set is a subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a superset of a specified collection. + + + true if the current set is a superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a correct superset of a specified collection. + + + true if the object is a correct superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a proper (strict) subset of a specified collection. + + + true if the current set is a correct subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set overlaps with the specified collection. + + + true if the current set and share at least one common element; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set and the specified collection contain the same elements. + + + true if the current set is equal to ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Adds an element to the current set and returns a value to indicate if the element was successfully added. + + + true if the element is added to the set; false if the element is already in the set. + + The element to add to the set. + + + + Count the elements in the given collection and determine both the total + count and how many of the elements that are present in the current set. + + + + + Cast the given collection to an ISet<T> if possible. If not, + return a new set containing the items. + + + + + Unlink a node from the linked list by updating the node pointers in + its preceeding and subsequent node. Also update the _first and _last + pointers if necessary. + + + + +

Implements a read-only Set wrapper.

+

Although this is advertised as immutable, it really isn't. Anyone with access to the + wrapped set can still change the set.

+
+
+ + + Constructs an immutable (read-only) Set wrapper. + + The Set that is wrapped. + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Adds an item to the . + + The object to add to the . + is always thrown + + + + Removes all items from the . + + is always thrown + + + + Determines whether the contains a specific value. + + + true if is found in the ; otherwise, false. + + The object to locate in the . + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.The zero-based index in at which copying begins. is null. is less than 0. is multidimensional.-or-The number of elements in the source is greater than the available space from to the end of the destination .-or-Type cannot be cast automatically to the type of the destination . + + + + Removes the first occurrence of a specific object from the . + + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + The object to remove from the . + is always thrown + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets a value indicating whether the is read-only. + + + True. + + + + + Adds an element to the current set and returns a value to indicate if the element was successfully added. + + + true if the element is added to the set; false if the element is already in the set. + + The element to add to the set. + is always thrown + + + + Modifies the current set so that it contains all elements that are present in both the current set and in the specified collection. + + The collection to compare to the current set. is null. + is always thrown + + + + Modifies the current set so that it contains only elements that are also in a specified collection. + + The collection to compare to the current set. is null. + is always thrown + + + + Removes all elements in the specified collection from the current set. + + The collection of items to remove from the set. is null. + is always thrown + + + + Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both. + + The collection to compare to the current set. is null. + is always thrown + + + + Determines whether a set is a subset of a specified collection. + + + true if the current set is a subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a superset of a specified collection. + + + true if the current set is a superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a correct superset of a specified collection. + + + true if the object is a correct superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a property (strict) subset of a specified collection. + + + true if the current set is a correct subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set overlaps with the specified collection. + + + true if the current set and share at least one common element; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set and the specified collection contain the same elements. + + + true if the current set is equal to ; otherwise, false. + + The collection to compare to the current set. is null. + + + +

Implements a thread-safe Set wrapper. The implementation is extremely conservative, + serializing critical sections to prevent possible deadlocks, and locking on everything. + The one exception is for enumeration, which is inherently not thread-safe. For this, you + have to lock the SyncRoot object for the duration of the enumeration.

+
+
+ + + Constructs a thread-safe ISet wrapper. + + The Set object that this object will wrap. + + + + Adds an item to the . + + The object to add to the .The is read-only. + + + + Removes all items from the . + + The is read-only. + + + + Determines whether the contains a specific value. + + + true if is found in the ; otherwise, false. + + The object to locate in the . + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.The zero-based index in at which copying begins. is null. is less than 0. is multidimensional.-or-The number of elements in the source is greater than the available space from to the end of the destination .-or-Type cannot be cast automatically to the type of the destination . + + + + Removes the first occurrence of a specific object from the . + + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + The object to remove from the .The is read-only. + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets a value indicating whether the is read-only. + + + true if the is read-only; otherwise, false. + + + + + Modifies the current set so that it contains all elements that are present in either the current set or in the specified collection. + + The collection to compare to the current set. is null. + + + + Modifies the current set so that it contains only elements that are also in a specified collection. + + The collection to compare to the current set. is null. + + + + Removes all elements in the specified collection from the current set. + + The collection of items to remove from the set. is null. + + + + Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both. + + The collection to compare to the current set. is null. + + + + Determines whether a set is a subset of a specified collection. + + + true if the current set is a subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a superset of a specified collection. + + + true if the current set is a superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a correct superset of a specified collection. + + + true if the object is a correct superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a property (strict) subset of a specified collection. + + + true if the current set is a correct subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set overlaps with the specified collection. + + + true if the current set and share at least one common element; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set and the specified collection contain the same elements. + + + true if the current set is equal to ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Adds an element to the current set and returns a value to indicate if the element was successfully added. + + + true if the element is added to the set; false if the element is already in the set. + + The element to add to the set. + + + + Returns an enumerator that iterates through a collection. Enumeration is inherently not + thread-safe. Use a lock on the SyncRoot to synchronize the entire enumeration process. + + + An object that can be used to iterate through the collection. + + 2 + + + + Returns an enumerator that iterates through the collection. Enumeration is inherently not + thread-safe. Use a lock on the SyncRoot to synchronize the entire enumeration process. + + + A that can be used to iterate through the collection. + + 1 + +
+
diff --git a/nhibernateg7/packages/Iesi.Collections.4.0.4/lib/netstandard1.0/Iesi.Collections.dll b/nhibernateg7/packages/Iesi.Collections.4.0.4/lib/netstandard1.0/Iesi.Collections.dll new file mode 100644 index 0000000..4b46363 Binary files /dev/null and b/nhibernateg7/packages/Iesi.Collections.4.0.4/lib/netstandard1.0/Iesi.Collections.dll differ diff --git a/nhibernateg7/packages/Iesi.Collections.4.0.4/lib/netstandard1.0/Iesi.Collections.xml b/nhibernateg7/packages/Iesi.Collections.4.0.4/lib/netstandard1.0/Iesi.Collections.xml new file mode 100644 index 0000000..b3d4d8c --- /dev/null +++ b/nhibernateg7/packages/Iesi.Collections.4.0.4/lib/netstandard1.0/Iesi.Collections.xml @@ -0,0 +1,552 @@ + + + + Iesi.Collections + + + + + Implementation of ISet that also maintains a linked list over all elements. + Enumeration of this set is guaranteed to return the elements in the order + they were added. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Adds an item to the . + + The object to add to the .The is read-only. + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets a value indicating whether the is read-only. + + + true if the is read-only; otherwise, false. + + + + + Removes all items from the . + + The is read-only. + + + + Determines whether the contains a specific value. + + + true if is found in the ; otherwise, false. + + The object to locate in the . + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.The zero-based index in at which copying begins. is null. is less than 0. is multidimensional.-or-The number of elements in the source is greater than the available space from to the end of the destination .-or-Type cannot be cast automatically to the type of the destination . + + + + Removes the first occurrence of a specific object from the . + + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + The object to remove from the .The is read-only. + + + + Modifies the current set so that it contains all elements that are present in either the current set or the specified collection. + + The collection to compare to the current set. is null. + + + + Modifies the current set so that it contains only elements that are also in a specified collection. + + The collection to compare to the current set. is null. + + + + Removes all elements in the specified collection from the current set. + + The collection of items to remove from the set. is null. + + + + Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both. + + The collection to compare to the current set. is null. + + + + Determines whether a set is a subset of a specified collection. + + + true if the current set is a subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a superset of a specified collection. + + + true if the current set is a superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a correct superset of a specified collection. + + + true if the object is a correct superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a proper (strict) subset of a specified collection. + + + true if the current set is a correct subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set overlaps with the specified collection. + + + true if the current set and share at least one common element; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set and the specified collection contain the same elements. + + + true if the current set is equal to ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Adds an element to the current set and returns a value to indicate if the element was successfully added. + + + true if the element is added to the set; false if the element is already in the set. + + The element to add to the set. + + + + Count the elements in the given collection and determine both the total + count and how many of the elements that are present in the current set. + + + + + Cast the given collection to an ISet<T> if possible. If not, + return a new set containing the items. + + + + + Unlink a node from the linked list by updating the node pointers in + its preceeding and subsequent node. Also update the _first and _last + pointers if necessary. + + + + +

Implements a read-only Set wrapper.

+

Although this is advertised as immutable, it really isn't. Anyone with access to the + wrapped set can still change the set.

+
+
+ + + Constructs an immutable (read-only) Set wrapper. + + The Set that is wrapped. + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Adds an item to the . + + The object to add to the . + is always thrown + + + + Removes all items from the . + + is always thrown + + + + Determines whether the contains a specific value. + + + true if is found in the ; otherwise, false. + + The object to locate in the . + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.The zero-based index in at which copying begins. is null. is less than 0. is multidimensional.-or-The number of elements in the source is greater than the available space from to the end of the destination .-or-Type cannot be cast automatically to the type of the destination . + + + + Removes the first occurrence of a specific object from the . + + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + The object to remove from the . + is always thrown + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets a value indicating whether the is read-only. + + + True. + + + + + Adds an element to the current set and returns a value to indicate if the element was successfully added. + + + true if the element is added to the set; false if the element is already in the set. + + The element to add to the set. + is always thrown + + + + Modifies the current set so that it contains all elements that are present in both the current set and in the specified collection. + + The collection to compare to the current set. is null. + is always thrown + + + + Modifies the current set so that it contains only elements that are also in a specified collection. + + The collection to compare to the current set. is null. + is always thrown + + + + Removes all elements in the specified collection from the current set. + + The collection of items to remove from the set. is null. + is always thrown + + + + Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both. + + The collection to compare to the current set. is null. + is always thrown + + + + Determines whether a set is a subset of a specified collection. + + + true if the current set is a subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a superset of a specified collection. + + + true if the current set is a superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a correct superset of a specified collection. + + + true if the object is a correct superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a property (strict) subset of a specified collection. + + + true if the current set is a correct subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set overlaps with the specified collection. + + + true if the current set and share at least one common element; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set and the specified collection contain the same elements. + + + true if the current set is equal to ; otherwise, false. + + The collection to compare to the current set. is null. + + + +

Implements a thread-safe Set wrapper. The implementation is extremely conservative, + serializing critical sections to prevent possible deadlocks, and locking on everything. + The one exception is for enumeration, which is inherently not thread-safe. For this, you + have to lock the SyncRoot object for the duration of the enumeration.

+
+
+ + + Constructs a thread-safe ISet wrapper. + + The Set object that this object will wrap. + + + + Adds an item to the . + + The object to add to the .The is read-only. + + + + Removes all items from the . + + The is read-only. + + + + Determines whether the contains a specific value. + + + true if is found in the ; otherwise, false. + + The object to locate in the . + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.The zero-based index in at which copying begins. is null. is less than 0. is multidimensional.-or-The number of elements in the source is greater than the available space from to the end of the destination .-or-Type cannot be cast automatically to the type of the destination . + + + + Removes the first occurrence of a specific object from the . + + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + The object to remove from the .The is read-only. + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets a value indicating whether the is read-only. + + + true if the is read-only; otherwise, false. + + + + + Modifies the current set so that it contains all elements that are present in either the current set or in the specified collection. + + The collection to compare to the current set. is null. + + + + Modifies the current set so that it contains only elements that are also in a specified collection. + + The collection to compare to the current set. is null. + + + + Removes all elements in the specified collection from the current set. + + The collection of items to remove from the set. is null. + + + + Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both. + + The collection to compare to the current set. is null. + + + + Determines whether a set is a subset of a specified collection. + + + true if the current set is a subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a superset of a specified collection. + + + true if the current set is a superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a correct superset of a specified collection. + + + true if the object is a correct superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a property (strict) subset of a specified collection. + + + true if the current set is a correct subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set overlaps with the specified collection. + + + true if the current set and share at least one common element; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set and the specified collection contain the same elements. + + + true if the current set is equal to ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Adds an element to the current set and returns a value to indicate if the element was successfully added. + + + true if the element is added to the set; false if the element is already in the set. + + The element to add to the set. + + + + Returns an enumerator that iterates through a collection. Enumeration is inherently not + thread-safe. Use a lock on the SyncRoot to synchronize the entire enumeration process. + + + An object that can be used to iterate through the collection. + + 2 + + + + Returns an enumerator that iterates through the collection. Enumeration is inherently not + thread-safe. Use a lock on the SyncRoot to synchronize the entire enumeration process. + + + A that can be used to iterate through the collection. + + 1 + +
+
diff --git a/nhibernateg7/packages/Iesi.Collections.4.0.4/lib/netstandard1.3/Iesi.Collections.dll b/nhibernateg7/packages/Iesi.Collections.4.0.4/lib/netstandard1.3/Iesi.Collections.dll new file mode 100644 index 0000000..4c21085 Binary files /dev/null and b/nhibernateg7/packages/Iesi.Collections.4.0.4/lib/netstandard1.3/Iesi.Collections.dll differ diff --git a/nhibernateg7/packages/Iesi.Collections.4.0.4/lib/netstandard1.3/Iesi.Collections.xml b/nhibernateg7/packages/Iesi.Collections.4.0.4/lib/netstandard1.3/Iesi.Collections.xml new file mode 100644 index 0000000..b3d4d8c --- /dev/null +++ b/nhibernateg7/packages/Iesi.Collections.4.0.4/lib/netstandard1.3/Iesi.Collections.xml @@ -0,0 +1,552 @@ + + + + Iesi.Collections + + + + + Implementation of ISet that also maintains a linked list over all elements. + Enumeration of this set is guaranteed to return the elements in the order + they were added. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Adds an item to the . + + The object to add to the .The is read-only. + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets a value indicating whether the is read-only. + + + true if the is read-only; otherwise, false. + + + + + Removes all items from the . + + The is read-only. + + + + Determines whether the contains a specific value. + + + true if is found in the ; otherwise, false. + + The object to locate in the . + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.The zero-based index in at which copying begins. is null. is less than 0. is multidimensional.-or-The number of elements in the source is greater than the available space from to the end of the destination .-or-Type cannot be cast automatically to the type of the destination . + + + + Removes the first occurrence of a specific object from the . + + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + The object to remove from the .The is read-only. + + + + Modifies the current set so that it contains all elements that are present in either the current set or the specified collection. + + The collection to compare to the current set. is null. + + + + Modifies the current set so that it contains only elements that are also in a specified collection. + + The collection to compare to the current set. is null. + + + + Removes all elements in the specified collection from the current set. + + The collection of items to remove from the set. is null. + + + + Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both. + + The collection to compare to the current set. is null. + + + + Determines whether a set is a subset of a specified collection. + + + true if the current set is a subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a superset of a specified collection. + + + true if the current set is a superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a correct superset of a specified collection. + + + true if the object is a correct superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a proper (strict) subset of a specified collection. + + + true if the current set is a correct subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set overlaps with the specified collection. + + + true if the current set and share at least one common element; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set and the specified collection contain the same elements. + + + true if the current set is equal to ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Adds an element to the current set and returns a value to indicate if the element was successfully added. + + + true if the element is added to the set; false if the element is already in the set. + + The element to add to the set. + + + + Count the elements in the given collection and determine both the total + count and how many of the elements that are present in the current set. + + + + + Cast the given collection to an ISet<T> if possible. If not, + return a new set containing the items. + + + + + Unlink a node from the linked list by updating the node pointers in + its preceeding and subsequent node. Also update the _first and _last + pointers if necessary. + + + + +

Implements a read-only Set wrapper.

+

Although this is advertised as immutable, it really isn't. Anyone with access to the + wrapped set can still change the set.

+
+
+ + + Constructs an immutable (read-only) Set wrapper. + + The Set that is wrapped. + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Adds an item to the . + + The object to add to the . + is always thrown + + + + Removes all items from the . + + is always thrown + + + + Determines whether the contains a specific value. + + + true if is found in the ; otherwise, false. + + The object to locate in the . + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.The zero-based index in at which copying begins. is null. is less than 0. is multidimensional.-or-The number of elements in the source is greater than the available space from to the end of the destination .-or-Type cannot be cast automatically to the type of the destination . + + + + Removes the first occurrence of a specific object from the . + + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + The object to remove from the . + is always thrown + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets a value indicating whether the is read-only. + + + True. + + + + + Adds an element to the current set and returns a value to indicate if the element was successfully added. + + + true if the element is added to the set; false if the element is already in the set. + + The element to add to the set. + is always thrown + + + + Modifies the current set so that it contains all elements that are present in both the current set and in the specified collection. + + The collection to compare to the current set. is null. + is always thrown + + + + Modifies the current set so that it contains only elements that are also in a specified collection. + + The collection to compare to the current set. is null. + is always thrown + + + + Removes all elements in the specified collection from the current set. + + The collection of items to remove from the set. is null. + is always thrown + + + + Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both. + + The collection to compare to the current set. is null. + is always thrown + + + + Determines whether a set is a subset of a specified collection. + + + true if the current set is a subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a superset of a specified collection. + + + true if the current set is a superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a correct superset of a specified collection. + + + true if the object is a correct superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a property (strict) subset of a specified collection. + + + true if the current set is a correct subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set overlaps with the specified collection. + + + true if the current set and share at least one common element; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set and the specified collection contain the same elements. + + + true if the current set is equal to ; otherwise, false. + + The collection to compare to the current set. is null. + + + +

Implements a thread-safe Set wrapper. The implementation is extremely conservative, + serializing critical sections to prevent possible deadlocks, and locking on everything. + The one exception is for enumeration, which is inherently not thread-safe. For this, you + have to lock the SyncRoot object for the duration of the enumeration.

+
+
+ + + Constructs a thread-safe ISet wrapper. + + The Set object that this object will wrap. + + + + Adds an item to the . + + The object to add to the .The is read-only. + + + + Removes all items from the . + + The is read-only. + + + + Determines whether the contains a specific value. + + + true if is found in the ; otherwise, false. + + The object to locate in the . + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.The zero-based index in at which copying begins. is null. is less than 0. is multidimensional.-or-The number of elements in the source is greater than the available space from to the end of the destination .-or-Type cannot be cast automatically to the type of the destination . + + + + Removes the first occurrence of a specific object from the . + + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + The object to remove from the .The is read-only. + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets a value indicating whether the is read-only. + + + true if the is read-only; otherwise, false. + + + + + Modifies the current set so that it contains all elements that are present in either the current set or in the specified collection. + + The collection to compare to the current set. is null. + + + + Modifies the current set so that it contains only elements that are also in a specified collection. + + The collection to compare to the current set. is null. + + + + Removes all elements in the specified collection from the current set. + + The collection of items to remove from the set. is null. + + + + Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both. + + The collection to compare to the current set. is null. + + + + Determines whether a set is a subset of a specified collection. + + + true if the current set is a subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a superset of a specified collection. + + + true if the current set is a superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a correct superset of a specified collection. + + + true if the object is a correct superset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set is a property (strict) subset of a specified collection. + + + true if the current set is a correct subset of ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set overlaps with the specified collection. + + + true if the current set and share at least one common element; otherwise, false. + + The collection to compare to the current set. is null. + + + + Determines whether the current set and the specified collection contain the same elements. + + + true if the current set is equal to ; otherwise, false. + + The collection to compare to the current set. is null. + + + + Adds an element to the current set and returns a value to indicate if the element was successfully added. + + + true if the element is added to the set; false if the element is already in the set. + + The element to add to the set. + + + + Returns an enumerator that iterates through a collection. Enumeration is inherently not + thread-safe. Use a lock on the SyncRoot to synchronize the entire enumeration process. + + + An object that can be used to iterate through the collection. + + 2 + + + + Returns an enumerator that iterates through the collection. Enumeration is inherently not + thread-safe. Use a lock on the SyncRoot to synchronize the entire enumeration process. + + + A that can be used to iterate through the collection. + + 1 + +
+
diff --git a/nhibernateg7/packages/NHibernate.5.2.5/.signature.p7s b/nhibernateg7/packages/NHibernate.5.2.5/.signature.p7s new file mode 100644 index 0000000..b6583c7 Binary files /dev/null and b/nhibernateg7/packages/NHibernate.5.2.5/.signature.p7s differ diff --git a/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/FireBird.cfg.xml b/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/FireBird.cfg.xml new file mode 100644 index 0000000..9e3c8e4 --- /dev/null +++ b/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/FireBird.cfg.xml @@ -0,0 +1,32 @@ + + + + + + NHibernate.Driver.FirebirdClientDriver + + DataSource=localhost; + Database=nhibernate; + User ID=SYSDBA;Password=masterkey; + MaxPoolSize=200; + charset=utf8; + + false + NHibernate.Dialect.FirebirdDialect + 60 + true 1, false 0, yes 1, no 0 + + diff --git a/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/HANA.cfg.xml b/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/HANA.cfg.xml new file mode 100644 index 0000000..f213149 --- /dev/null +++ b/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/HANA.cfg.xml @@ -0,0 +1,18 @@ + + + + + NHibernate.Driver.HanaColumnStoreDriver + + + Server=localhost:39015;UserID=nhibernate;Password=; + Enlist=false; + + NHibernate.Dialect.HanaColumnStoreDialect + + diff --git a/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/MSSQL.cfg.xml b/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/MSSQL.cfg.xml new file mode 100644 index 0000000..8e5706a --- /dev/null +++ b/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/MSSQL.cfg.xml @@ -0,0 +1,16 @@ + + + + + + NHibernate.Driver.Sql2008ClientDriver + + Server=(local);initial catalog=nhibernate;Integrated Security=SSPI + + NHibernate.Dialect.MsSql2008Dialect + + diff --git a/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/MySql.cfg.xml b/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/MySql.cfg.xml new file mode 100644 index 0000000..be2366c --- /dev/null +++ b/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/MySql.cfg.xml @@ -0,0 +1,16 @@ + + + + + NHibernate.Driver.MySqlDataDriver + + Database=nhibernate;Data Source=localhost;User Id=nhibernate;Password=; + Protocol=memory;Old Guids=True; + + NHibernate.Dialect.MySQL5Dialect + + \ No newline at end of file diff --git a/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/Oracle-Managed.cfg.xml b/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/Oracle-Managed.cfg.xml new file mode 100644 index 0000000..efa6b51 --- /dev/null +++ b/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/Oracle-Managed.cfg.xml @@ -0,0 +1,25 @@ + + + + + + NHibernate.Driver.OracleManagedDataClientDriver + + User ID=nhibernate;Password=nhibernate;Data Source=(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ORCL))) + + false + NHibernate.Dialect.Oracle10gDialect + true 1, false 0, yes 'Y', no 'N' + + false + + + + diff --git a/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/Oracle.cfg.xml b/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/Oracle.cfg.xml new file mode 100644 index 0000000..790f06f --- /dev/null +++ b/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/Oracle.cfg.xml @@ -0,0 +1,25 @@ + + + + + + NHibernate.Driver.OracleClientDriver + + User ID=nhibernate;Password=nhibernate;Data Source=localhost + + false + NHibernate.Dialect.OracleDialect + true 1, false 0, yes 'Y', no 'N' + + false + + + + \ No newline at end of file diff --git a/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/PostgreSQL.cfg.xml b/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/PostgreSQL.cfg.xml new file mode 100644 index 0000000..459543f --- /dev/null +++ b/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/PostgreSQL.cfg.xml @@ -0,0 +1,15 @@ + + + + + NHibernate.Driver.NpgsqlDriver + + Server=localhost;Database=nhibernate;User ID=nhibernate;Password=nhibernate;Enlist=true; + + NHibernate.Dialect.PostgreSQL83Dialect + + diff --git a/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/SQLite.cfg.xml b/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/SQLite.cfg.xml new file mode 100644 index 0000000..50890ae --- /dev/null +++ b/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/SQLite.cfg.xml @@ -0,0 +1,20 @@ + + + + + NHibernate.Driver.SQLite20Driver + + + Data Source=nhibernate.db; + DateTimeFormatString=yyyy-MM-dd HH:mm:ss.FFFFFFF; + + NHibernate.Dialect.SQLiteDialect + + diff --git a/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/SapSQLAnywhere.cfg.xml b/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/SapSQLAnywhere.cfg.xml new file mode 100644 index 0000000..9512fef --- /dev/null +++ b/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/SapSQLAnywhere.cfg.xml @@ -0,0 +1,21 @@ + + + + + NHibernate.Driver.SapSQLAnywhere17Driver + + + UID=DBA;PWD=sql;Server=localhost;DBN=nhibernate;DBF=c:\nhibernate.db;ASTOP=No;Enlist=false; + + NHibernate.Dialect.SybaseSQLAnywhere12Dialect + true=1;false=0 + + diff --git a/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/SqlServerCe.cfg.xml b/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/SqlServerCe.cfg.xml new file mode 100644 index 0000000..c3b27bf --- /dev/null +++ b/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/SqlServerCe.cfg.xml @@ -0,0 +1,17 @@ + + + + + + 0 + NHibernate.Driver.SqlServerCeDriver + + Data Source=NHibernate.sdf + + NHibernate.Dialect.MsSqlCe40Dialect + + \ No newline at end of file diff --git a/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/SybaseASE.cfg.xml b/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/SybaseASE.cfg.xml new file mode 100644 index 0000000..4f722b1 --- /dev/null +++ b/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/SybaseASE.cfg.xml @@ -0,0 +1,16 @@ + + + + + NHibernate.Driver.SybaseAseClientDriver + + Data Source=10.0.0.1;Port=5000;Database=nhibernate;User ID=nhibernate;Password=password + + NHibernate.Dialect.SybaseASE15Dialect + true=1;false=0 + + \ No newline at end of file diff --git a/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/SybaseSQLAnywhere.cfg.xml b/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/SybaseSQLAnywhere.cfg.xml new file mode 100644 index 0000000..04a929b --- /dev/null +++ b/nhibernateg7/packages/NHibernate.5.2.5/ConfigurationTemplates/SybaseSQLAnywhere.cfg.xml @@ -0,0 +1,16 @@ + + + + + NHibernate.Driver.SybaseSQLAnywhereDriver + + UID=DBA;PWD=sql;Server=localhost;DBN=nhibernate;DBF=c:\nhibernate.db;ASTOP=No + + NHibernate.Dialect.SybaseSQLAnywhere12Dialect + true=1;false=0 + + \ No newline at end of file diff --git a/nhibernateg7/packages/NHibernate.5.2.5/NHibernate.5.2.5.nupkg b/nhibernateg7/packages/NHibernate.5.2.5/NHibernate.5.2.5.nupkg new file mode 100644 index 0000000..20dd42c Binary files /dev/null and b/nhibernateg7/packages/NHibernate.5.2.5/NHibernate.5.2.5.nupkg differ diff --git a/nhibernateg7/packages/NHibernate.5.2.5/NHibernate.license.txt b/nhibernateg7/packages/NHibernate.5.2.5/NHibernate.license.txt new file mode 100644 index 0000000..866688d --- /dev/null +++ b/nhibernateg7/packages/NHibernate.5.2.5/NHibernate.license.txt @@ -0,0 +1,460 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + diff --git a/nhibernateg7/packages/NHibernate.5.2.5/NHibernate.readme.md b/nhibernateg7/packages/NHibernate.5.2.5/NHibernate.readme.md new file mode 100644 index 0000000..0428073 --- /dev/null +++ b/nhibernateg7/packages/NHibernate.5.2.5/NHibernate.readme.md @@ -0,0 +1,91 @@ +Welcome to NHibernate +===================== + +NHibernate is a mature, open source object-relational mapper for the .NET framework. It is actively developed, +fully featured and used in thousands of successful projects. + +The NHibernate community website - - has a range of resources to help you get started, +including [howtos][A1], [blogs][A2] and [reference documentation][A3]. + +[A1]: http://nhibernate.info/doc/ +[A2]: http://nhibernate.info/blog/ +[A3]: http://nhibernate.info/doc/nh/en/index.html + +Latest Version +-------------- + +The quickest way to get the latest release of NHibernate is to add it to your project using +NuGet (). + +Alternatively binaries are available from SourceForge at . + +You are encouraged to review the release notes ([releasenotes.txt](releasenotes.txt)), particularly when upgrading to a +later version. The release notes will generally document any breaking changes. + +Community Forums +---------------- + +There are two official NHibernate community forums: + +* [NHibernate Users][B1] - a forum for users to find help using NHibernate +* [NHibernate Development][B2] - a forum for the developers of NHibernate + +[B1]: http://groups.google.com/group/nhusers +[B2]: http://groups.google.com/group/nhibernate-development + +Bug Reports +----------- + +If you find any bugs, please report them using the [GitHub issue tracker][C1]. A +test-case that demonstrates the issue is usually required. Instructions on providing a test-case +can be found in [contributing guidelines][C3] or [here][C2]. + +[C1]: http://github.com/nhibernate/nhibernate-core/issues +[C2]: http://nhibernate.info/blog/2008/10/04/the-best-way-to-solve-nhibernate-bugs-submit-good-unit-test.html +[C3]: CONTRIBUTING.md + +Licenses +-------- + +- This software is distributed under the terms of the Free Software Foundation [Lesser GNU Public License (LGPL), version 2.1][D1] (see [LICENSE.txt][D2]). +- The documentation for this software is distributed under the terms of the Free Software Foundation [GNU Free Documentation License (GNU FDL), version 1.1][D3] (see [doc/LICENSE.txt][D4]). + +[D1]: http://www.gnu.org/licenses/lgpl-2.1-standalone.html +[D2]: LICENSE.txt +[D3]: http://www.gnu.org/licenses/old-licenses/fdl-1.1-standalone.html +[D4]: doc/LICENSE.txt + +Credits +------- + +Many thanks to the following individuals, organisations and projects whose work is so important to the success +of NHibernate (in no particular order): + +* [NUnit][] - unit-testing +* [Nant][] - build automation +* [CodeBetter][] - [TeamCity][] continuous integration and build management server hosting +* [GitHub][] and [SourceForge][] - source code hosting +* [Atlassian][] - JIRA bug tracker licence and hosting +* [Log4net][] - logging, by the [Apache Software Foundation][] +* [JetBrains][] - [ReSharper][] licences for NHibernate developers +* [LinFu][] - proxy implementation (Philip Laureano) +* Iesi.Collections - source code taken from an [article][] written by Jason Smith +* [Relinq][] - Linq provider for NHibernate +* [AsyncGenerator][] - Roslyn based async C# code generator by @maca88 + + +[NUnit]: http://www.nunit.org +[Nant]: http://nant.sourceforge.net +[CodeBetter]: http://www.codebetter.com +[TeamCity]: http://www.jetbrains.com/teamcity +[GitHub]: http://www.github.com +[SourceForge]: http://www.sourceforge.net +[Atlassian]: http://www.atlassian.com +[Log4net]: http://logging.apache.org/log4net +[Apache Software Foundation]: http://www.apache.org +[JetBrains]: http://www.jetbrains.com +[ReSharper]: http://www.jetbrains.com/resharper +[LinFu]: http://code.google.com/p/linfu +[article]: http://www.codeproject.com/KB/recipes/sets.aspx +[Relinq]: http://relinq.codeplex.com/ +[AsyncGenerator]: http://github.com/maca88/AsyncGenerator diff --git a/nhibernateg7/packages/NHibernate.5.2.5/NHibernate.releasenotes.txt b/nhibernateg7/packages/NHibernate.5.2.5/NHibernate.releasenotes.txt new file mode 100644 index 0000000..35275bd --- /dev/null +++ b/nhibernateg7/packages/NHibernate.5.2.5/NHibernate.releasenotes.txt @@ -0,0 +1,4217 @@ +Build 5.2.5 +============================= + +Release notes - NHibernate - Version 5.2.5 + +5 issues were resolved in this release. + +** Bug + + * #2075 Missing cast when comparing a guid and string columns in SAP SQL Anywhere + * #2046 Fix nullable Guid ToString is not translated correctly on some dialects + * #2043 System.Reflection.TargetException when an interface is used as class mapping proxy definition + * #2040 Incorrect SQL when comparing a guid and string column in Sql Server + +** Task + + * #2086 Release 5.2.5 + +Build 5.2.4 +============================= + +Release notes - NHibernate - Version 5.2.4 + +3 issues were resolved in this release. The dialect change has the side effect of +re-enabling a hack used by NHibernate.Spatial, allowing Spatial users to upgrade +to NHibernate 5.2.x. See NHibernate.Spatial#104. + + ##### Possible Breaking Changes ##### + * Using DML on an entity collection was applying the changes without + filtering according to the entity. It will now throw a + NotSupportedException. + +** Bug + + * #2020 Throw for DML on filter + * #2011 Use a statically resolved dialect when building the session factory + +** Task + + * #2030 Release 5.2.4 + +As part of releasing 5.2.4, a missing 5.2.0 possible breaking change has been added about +property-ref on null values. See 5.2.0 possible breaking changes. + +Build 5.2.3 +============================= + +Release notes - NHibernate - Version 5.2.3 + +1 issue was resolved in this release. + +** Bug + + * #1964 Unable to serialize session because SerializationFieldInfo is not marked as serializable + +Build 5.2.2 +============================= + +Release notes - NHibernate - Version 5.2.2 + +3 issues were resolved in this release. + +** Bug + + * #1953 Query space invalidation doesn't work for bulk actions + * #1269 NH-3069 - Cannot use Session.Lock with Version column on abstract base class + +** Task + + * #1957 Release 5.2.2 + +Build 5.2.1 +============================= + +Release notes - NHibernate - Version 5.2.1 + +5 issues were resolved in this release. + +** Bug + + * #1928 JoinAlias on JoinQueryOver fails + * #1920 ISession.Get may fail with a null exception + * #1918 Property-ref on many-to-one with composite id fails + +** Task + + * #1932 Release 5.2.1 + * #1927 Add missing possible breaking change + +As part of releasing 5.2.1, a missing 5.2.0 possible breaking change has been added about duplicated columns +in mapping. See 5.2.0 possible breaking changes. + +Build 5.2.0 +============================= + +Release notes - NHibernate - Version 5.2.0 + +157 issues were resolved in this release. + + ##### Possible Breaking Changes ##### + * Entities having many non-readonly properties (including many-to-one) mapped to + the same column will no more silently ignore the trouble till an insert or update + is attempted. They will now cause the session factory built to fail. When + mapping many properties to the same column, all of them excepted at most one + should be mapped with `insert="false" update="false"`. + * Mappings mixing column elements and formula elements were taking into account + only the formula elements. They will now take into account all elements. + * Mappings mixing column elements and/or formula elements with a column attribute + or a formula attribute were silently ignoring the attribute. They will now throw. + * Mappings mixing a column attribute and a formula attribute were silently doing + some best effort logic, either considering this as a two columns mapping, the + second one being the formula (most cases), or only taking into account the + formula (case of the `` mapping). They will now throw. + * NHibernate StringType has gained case-sensitivity and culture parameters. + Previously it was ignoring parameters. This type may change its behavior + for any mapping having defined parameters for this type. See #1833. + * Mapping a dynamic component with a Hashtable property instead of an + IDictionary is no more supported. + * Querying a dynamic entity as a Hashtable instead of an IDictionary is no more + supported. + * A collection mapped with a `property-ref` will no more support being accessed + when the referenced property is null. It will throw. Previously, the collection + was not throwing but was always loaded empty. + * With PostgreSQL, a HQL query using the bitwise xor operator "^" or "bxor" + was exponentiating the arguments instead. It will now correctly apply the xor + operator. (# operator in PostgreSQL SQL.) + * Auto-generated constraint names will not be the same than the ones generated + with previous NHibernate versions under .Net Framework. (Under .Net Core those + names were anyway changing at each run.) The new ones will be the same + whatever the runtime used for generating them. + * Some generated PK names may change, if a table name has a quoting symbol at + precise 13th character. + * The WcfOperationSessionContext has been removed from .Net Core and .Net + Standard builds. See #1842. + * Some classes, which were not serializing the session factory, do now serialize it. + In case of cross-process serialization/deserialization, these session factories + will need to be properly named, by setting the session_factory_name setting in the + configuration used to build them. This may mainly affect users of a distributed + second level cache, if their cache implementation uses binary serialization. + Affected classes are: CacheKey, CollectionKey, EntityKey and EntityUniqueKey. + * Some types cache representations have changed. Out-of-process second level + caches should be cleared after upgrading NHibernate, if some of those types + were cached. The concerned types are: CultureInfoType, TypeType, UriType, + XDocType, XmlDocType. + * Dialect.GetIdentitySelectString was called by the entity persisters with + inverted parameter values: the table name in the column parameter, and the + column name in the table parameter. No built-in dialects were using the + parameter values. External dialects which were using it inverted (causing issues + to collection persisters, which have always supplied them correctly) needs + to be accordingly adjusted. + * Users providing through an IObjectFactory some custom logic for instantiating + value types will now need to supply their own result transformer if they were + using AliasToBeanResultTransformer with value types, or their own entity + tuplizer if they were using value types as entities. + * Users providing through an IObjectFactory some custom logic for instantiating + their custom session contexts will have to implement + ICurrentSessionContextWithFactory and add a parameterless public constructor + to their custom context, and move their custom instantiation logic from + IObjectsFactory.CreateInstance(Type, object[]) to + IObjectsFactory.CreateInstance(Type). + * Various *Binding classes of NHibernate will now always have their protected + dialect field null. (These classes are not expected to be derived by users, + as there is no way to use custom descendants with NHibernate.) + * AbstractPersistentCollection.AfterInitialize does no more perform queued + operations. Queued operations are now run by a later call to a new method, + ApplyPendingOperations. Concrete custom implementations relying on the queued + operations to be done by their base AfterInitialize will need to be changed + accordingly. + +** Bug + + * #1900 Do not generate FK on non-generated unique constraint + * #1888 Second level cache key mismatch + * #1886 Superfluous SQL casts generated in FirebirdClientDriver + * #1885 Process classes accordingly to inheritance path in mapping by code + * #1884 Fix attempt of static proxies to call base method for abstract classes + * #1874 Item in child collection not being removed + * #1872 Fix property ref handling + * #1870 Update build-menu options in documentation + * #1867 Fix registration of current_date for some dialects + * #1859 Fix filter & where fragment appended after lock hint + * #1855 Fix NotNullUnique not taken into account for single column + * #1849 Loquatious QueryCache constraint should be an IQueryCacheFactory constraint + * #1836 Cannot create configuration due to log4net loading failure + * #1824 property-ref on a component's property causes "wrong number of columns" error + * #1821 Allow using ICompositeUserType for collection element mappings in Mapping By Code + * #1818 Handle DbDataReaders that do not support GetSchemaTable + * #1812 Fix the handling without meta-values + * #1809 Update the mapping documentation + * #1799 Default value of 'proxyfactory.factory_class' in the documentation + * #1774 HQL and LINQ query by the type on with meta-type "string" fails + * #1769 Table mapping for UniqueColumn uses unstable GetHashCode() method + * #1764 Fix configuration schema forbidding custom bytecode provider + * #1760 Support formula on one-to-many map-key + * #1756 Fix unsaved-value for assigned identifiers + * #1753 Fix possible InvalidCastException in ActionQueue + * #1751 Avoid completing the same transaction twice + * #1748 Fix a bad setting naming about transaction scopes + * #1745 Remove obsoleted hibernate configuration prefix + * #1744 Reconnect lazy property proxy on deserialization + * #1737 Remove a binary breaking change introduced in #305 + * #1728 Generate a correct proxy for interfaces + * #1727 Fix a null-ref exception with no-proxy one-to-one + * #1726 Fix serialization exception when run on .NET Core 2.1 + * #1719 Cascade delete-orphan on no-proxy null association fails + * #1706 Entity Projection: Fixed AsEntity() for root entity + * #1704 GroupBy to custom class fails with ArgumentException + * #1696 Fixed CriteriaImpl.Clone for readonly query + * #1692 Update base_mapping.xml + * #1673 Bitwise xor treated as pow with PostgreSQL + * #1654 Fix the url to the quickstart of DocBook + * #1635 IdentitySelectString implementation is inconsistent + * #1612 Fix TypedValue not always using adequate comparer with SetParameterList + * #1609 Schema validation using SQLite and a specific schema fails + * #1366 NH-3506 - ICriteria/QueryOver create incorrect left join condition when table-per-hierarchy is used with filters + * #1358 NH-3992 - Intermediate inherited classes are not mapped correctly + * #1344 NH-3864 - Cacheable Multicriteria/Future'd query with aliased join throw exception + * #1339 NH-3823 - Initialization of Set with Lazy=Extra causes pending additions to disappear + * #1338 NH-3806 - Saving entities with proxy associations leads to fetching associated entities + * #1300 NH-3403 - Wrong parameter size in query with MsSql2000Dialect,MsSql2005Dialect and MsSql2008Dialect + * #1293 NH-3350 - Duplicate records using Future() + * #1278 NH-3189 - IManyToOneMapper lacks method to add columns AND formula into a single relationship + * #1214 NH-2180 - Many-To-Many with Property-ref fails to get subitems with FetchMode Join + * #1201 NH-1316 - PostgreSQL dialect use of lastval to retrieve last inserted "id" not safe with Triggers + * #1182 NH-3860 - Missing EntityName in IManyToOneMapper + * #1170 NH-3646 - Incorrect query when items removed from a collection of components contain null values + * #1163 NH-3545 - SchemaValidator fails for PostgreSql sequences + * #1151 NH-3426 - Wrong result when converting Guid to string + * #1121 NH-3095 - Cast from mapped long field to enum leads to 'Specified cast not valid' + * #1096 NH-2836 - SchemaValidator throws with SqlCe4 if db-schema set + * #1089 NH-2755 - LockMode hash differs in x86 and 64bit OS + * #1037 NH-3749 - Unnecessary comma in CREATE TABLE statement + * #1016 NH-3007 - Informix dialect generates incorrect boolean constants + * #1000 NH-2558 - NoViableAltException with boolean expression in OrderBy clause + * #990 NH-2016 - Duplicate Association Path when creating multiple aliases + * #460 Fix Criteria caching filtered collections + +** New Feature + + * #1892 Allow disabling Firebird driver parameter casting + * #1879 LINQ Coalesce and Conditional on Properties + * #1854 Add SQL Anywhere 17 support + * #1848 Add in ByCode support of all type mappings on Id + * #1833 Parametrize string type comparer + * #1830 Add a Linux build menu + * #1796 Support CacheMode in QueryBatch + * #1786 Document future results + * #1772 Support futures with stateless session + * #1752 Async ISynchronization + * #1742 Add new DB2CoreDriver to use with IBM.Data.DB2.Core provider + * #1693 Implement SurrogateSelector + * #1690 Bitwise xor not supported by SQLite + * #1682 Add support for System.MathF methods + * #1662 Add support for SAP HANA + * #1633 Added support for batching 2nd level cache operations when loading entities and collections + * #1631 Create UtcTicks and UtcDbTimestamp types + * #1599 Full control of entities fetching in Criteria + * #1381 NHibernate's IQuery is missing AddSynchronizedQuerySpace + * #968 NH-2285 - Support for LockMode in linq provider + * #920 NH-3991 - Support for Sybase ASE ADO.NET 4 Provider + * #897 NH-2187 - ElementAt LINQ extension method is not supported. + * #838 NH-3805 - Add support for string indexer property (get_Chars) + * #819 NH-3088 - Support the item operator [] on lists in linq queries + +** Improvement + + * #1908 Control over BeginTransaction in AdoTransaction + * #1905 Improve support of Npgsql 4 + * #1901 Add ability to use dynamic entities as C# dynamic + * #1890 Merge two logs in one + * #1875 Improve exception message in case of duplicated column + * #1869 Replace an O(n) lookup in LINQ query parsing by an O(1) one + * #1846 Remove dependency on System.Security.Permissions package for .NET Standard and .NET Core + * #1842 Remove WcfOperationSessionContext from .Net Core and .Net Standard + * #1838 Cannot add HqlJoin to HqlFrom + * #1827 Include the query in loader PostInstantiate QueryException + * #1819 Append the batched sql statement when StaleStateException occurs + * #1814 Mark proxy assembly with IgnoresAccessChecksToAttribute to allow implementing non public interfaces + * #1808 Support mixed formulas and columns + * #1792 Obsolete HolderInstantiator + * #1788 Implement multiple get and put for query cache and query batch + * #1785 Update user types documentation + * #1782 Refactor BugTestCase + * #1781 Clean-up IObjectsFactory usages + * #1778 Allow to use dynamic objects as dynamic components + * #1777 Replace ICache interface by a CacheBase class + * #1776 Make cache types serialization friendly + * #1775 Start/Stop required db-service for TeamCity + * #1770 Make obsolete abstract virtual + * #1767 Allow generic dictionaries for dynamic entities + * #1765 Provide cacheable representations for all NHibernate built-in types + * #1762 Remove duplicated and obsolete interceptor documentation + * #1761 Update mapping documentation + * #1759 Support mixed formulas and columns in By Code + * #1736 Remove excessive rowIdAlias parameter in Loader + * #1713 Update contributing guidelines + * #1712 Support IEquatable in LINQ provider + * #1710 Rationalize DateTimeOffset read and write + * #1709 Lazy properties static proxy + * #1703 Remove dialect instantiation in AddDeserializedMapping + * #1700 Single place to specify TargetFrameworks + * #1699 Add ability to load types from in-memory-only assemblies + * #1698 Document setting the logger factory programmatically + * #1694 Implement CollectionHelper.GetHashCode that accepts IEqualityComparer + * #1689 Purge more Invariant culture usages + * #1671 Decouple configuration of IObjectsFactory from BytecodeProvider + * #1666 Handle multi-queries support in FutureBatch + * #1656 Allow any cache.* property in NHibernate configuration + * #1641 Add cross platform build for full .NET Framework + * #1452 Async After-/BeforeTransactionCompletion + * #874 NH-3543 - Enhanced Db2 driver to support multi query + * #865 NH-2428 - Session.MultiCriteria and FlushMode.Auto inside transaction + * #840 NH-3835 - Future/MultiCriteria 2nd level caching + * #822 NH-3150 - Select Post Insert Generator Improvements + * #755 NH-3670 - Dynamic component should allow generic dictionary + * #752 NH-3541 - Future queries of Criteria API/QueryOver are batched separately from other query methods + * #696 Upgrade to ReLinq 2.2.0 + * #415 Add check to ensure that IUserCollectionType.Instantiate returns uninitialized collection + +** Task + + * #1863 Release 5.2.0 + * #1823 Run tests for SQLite on .NET Core + * #1783 Obsolete MultiQuery and MultiCriteria + * #1773 Obsolete unused version related methods of SByteType + * #1771 Obsolete unused "xml" type methods + * #1743 Merge 5.1.3 into master + * #1739 Upgrade to AsyncGenerator 0.8.2.7 + * #1688 Merge 5.1.2 into master + * #1687 Update NUnit to 3.10.1 + * #881 NH-3358 - Document all attributes for the element tag + +** Tests + + * #1887 Test ref and out methods with static proxy + * #1724 NH-2716 - Modify test case for discarding the alleged bug + * #1584 Test Parent property is not accessible in queries + * #1531 Test for Merging a bidirectional list creates unnecessary UPDATE statement + * #1440 Test case for ComposedId Entity with Lazy Property is not proxified + * #1414 Test ISession.IsDirty() should not trigger cascade saving + +As part of releasing 5.2.0, a misnamed setting in 5.0.0 release notes has been fixed: +transaction.use_connection_on_system_events correct name is transaction.use_connection_on_system_prepare + +Build 5.1.5 +============================= + +Release notes - NHibernate - Version 5.1.5 + + ##### Possible Breaking Changes ##### + * Using DML on an entity collection was applying the changes without + filtering according to the entity. It will now throw a + NotSupportedException. + +** Bug + + * #2043 System.Reflection.TargetException when an interface is used as class mapping proxy definition + * #2020 Throw for DML on filter + +** Task + * #2074 Release 5.1.5 + +Build 5.1.4 +============================= + +Release notes - NHibernate - Version 5.1.4 + +** Bug + + * #1959 Backport Query space invalidation doesn't work for bulk actions + +Build 5.1.3 +============================= + +Release notes - NHibernate - Version 5.1.3 + +** Bug + + * #1741 Fix DbType.Binary registration in DB2Dialect + * #1732 Dictionary failure in Loader + * #1730 Query cache always missed in session having altered the entities + * #1711 Fix static proxy serialization + +** Task + + * #1716 Release 5.1.3 + + +Build 5.1.2 +============================= + +Release notes - NHibernate - Version 5.1.2 + +** Bug + + * #1680 RowCount not working with JoinEntityAlias + * #1672 Generated async methods do not correctly propagate OperationCanceledException + * #1667 Collection initializing with zero rows after update to NH5 + * #1660 Wrong CopyTo implementation + * #1650 Cannot use cache.use_sliding_expiration in hibernate.cfg.xml + * #1585 Hashset unsupported by SetParameterList + * #1355 NH-3928 - Random invalid SQL generated when using bitwise operators + +** Task + + * #1668 Merge 5.0.5 into 5.1.x + * #1664 Release 5.1.2 + * #1659 Merge 5.0.4 into 5.1.x + +As part of releasing 5.1.2, a missing 5.0.0 possible breaking change has been added about future queries with data +providers not actually supporting them. See 5.0.0 possible breaking changes. + + +Build 5.1.1 +============================= + +Release notes - NHibernate - Version 5.1.1 + +** Bug + + * #1645 One-to-one with property-ref triggers StackOverflow Exception + * #1643 TypeLoadException in StaticProxyFactory after upgrading to 5.1.0 + * #1640 Handle all overloads of String.Trim*() + * #1636 Fix api documentation assets path + * #1628 StackOverflowException for lazy proxied entities with explicit interface properties + * #1618 Fix NuGet push script + * #1149 NH-3391 - StatelessSession: one-to-one detail-object is always null + +** Improvement + + * #1646 Add a link to release notes in NuGet package + * #1639 Speedup access to SQL Server on Linux + * #1624 Add missing ids on documentation sections + * #1619 Document "entity join" and "entity projection" + +** Task + + * #1649 Release 5.1.1 + * #1622 Update cache documentation + * #1621 Upgrade Async Generator to a version compatible with VS 15.6.3 + + +Build 5.1.0 +============================= + +Release notes - NHibernate - Version 5.1.0 + +** Highlights + * NHibernate has gained two new target frameworks: .Net Core 2.0 and .Net Standard 2.0. NHibernate NuGet package + provides them, along with the .Net framework 4.6.1 build. + For these new frameworks, some additional specificities or limitations apply: + * Binary serialization is not supported - the user shall implement serialization surrogates for System.Type, + FieldInfo, PropertyInfo, MethodInfo, ConstructorInfo, Delegate, etc. + * SqlClient, Odbc, Oledb drivers are converted to ReflectionBasedDriver to avoid the extra dependencies. + * CallSessionContext uses a static AsyncLocal field to mimic the CallContext behavior. + * System transactions (transaction scopes) are untested, due to the lack of data providers supporting them. + * 114 issues were resolved in this release. + + ##### Possible Breaking Changes ##### + * Since Ingres9Dialect is now supporting sequences, the enhanced-sequence identifier generator will default to + using a sequence instead of a table. Revert to previous behavior by using its force_table_use parameter. + * Some overridable methods of the Dialect base class and of MsSql2000Dialect have been obsoleted in favor of + new methods. Dialects implementors need to override the replacing methods if they were overriding the + obsolete ones, which are: + * Dialect.GetIfNotExistsCreateConstraint(Table table, string name), replaced by + GetIfNotExistsCreateConstraint(string catalog, string schema, string table, string name). + * Dialect.GetIfNotExistsCreateConstraintEnd(Table table, string name), replaced by + GetIfNotExistsCreateConstraintEnd(string catalog, string schema, string table, string name). + * Dialect.GetIfExistsDropConstraint(Table table, string name), replaced by + GetIfExistsDropConstraint(string catalog, string schema, string table, string name). + * Dialect.GetIfExistsDropConstraintEnd(Table table, string name), replaced by + GetIfExistsDropConstraintEnd(string catalog, string schema, string table, string name). + * MsSql2000Dialect.GetSelectExistingObject(string name, Table table), replaced by + GetSelectExistingObject(string catalog, string schema, string table, string name). + +** Bug + + * #1606 NHibernate 5 precision maximum on decimal reduced vs. NHibernate 4 + * #1605 MySql batcher may attempt initiating a new batch without closing open reader first. + * #1604 MySql batcher disables db exception translation + * #1602 Preserve original snapshot mode. + * #1594 AsyncLocal leak in SystemTransactionContext + * #1587 Prevent substitute garbage collection + * #1565 For update with outer join fails with PostgreSQL + * #1562 Fix round registration + * #1559 Deep removal of Fetch result operators when Any is used + * #1556 Linq query with "Contains" on persistent collection fails + * #1551 Assert for a null reference in a flaky test. + * #1536 Avoid a null reference exception in ExpressionKeyVisitor + * #1535 Fix some HQL functions registration + * #1534 Fixed entity name retrieval for EntityProjection + * #1526 ExpressionKeyVisitor does not produce unique keys for anonymous types coming from different assemblies + * #1514 Fix exceptions serialization + * #1511 Test Unicode string. + * #1509 Add missing NHibernateLogLevel.Info in example web project + * #1507 NH-3119 - fix test not supporting optimization + * #1506 SQLite is bugged with distributed transactions: disable distributed tests + * #1505 Chaining scopes with ODBC is bugged: disabling the test. + * #1501 Fix NH-3023 test + * #1496 Fix ManyToOneType.IsModified to handle both object instance and identifier passed to the parameter “old”. + * #1491 Forgotten async generation for #1487 + * #1486 Fix IsModified so that a null equates empty components when using select-before-update. + * #1484 Fix default types + * #1478 Exception when using envers with the latest logging changes + * #1476 Fix GetQueryCache storing two different caches. + * #1468 Comparison with DateTime? produces wrong SQL + * #1463 Fix a null reference case in session context + * #1454 Fix ProxyFactory cache + * #1445 Upgrade AsyncGenerator to 0.6.2 and regenerate. + * #1442 Unable to use an entity with a `FieldInterceptor` property and a lazy loaded property + * #1436 StackOverflowException when merging an entity with a lazy property + * #1434 Replace remaining SetOptions with WithOptions + * #1385 SecondLevelCache CreateSQLQuery().UniqueResult() throws Exception Specified cast is not valid. + * #1372 NH-3982 - Simple query with Cacheable, Fetch and SingleOrDefault throws exception (regression from 3.3.0) + * #1371 NH-3898 - Configuring a property with generated="insert" turns "Property.IsUpdatable" into"false" even using update="true" in the xml mapping file. + * #1363 NH-2500 - NH 3.0 Linq provider uses query parameters from first call in subsequent calls. + * #1335 NH-3787 - Decimal truncation in Linq ternary expression + * #1330 NH-3673 - Closure variable values locked in from expressions in NHibernate LINQ provider + * #1226 NH-2534 - Join-fetching a many-to-one with property-ref results in select n+1 problem + * #1196 NH-4087 - Decimal truncation occurs after 5 digits + * #1119 NH-3084 - Class NHibernate.Loader.Loader logs SQL statement on INFO level + * #1052 NH-3976 - Inconsistent Decimal/NHibernateUtil.Currency handling causing runtime error when using Oracle.ManagedDataAccess + * #987 NH-1509 - MsSql2000Dialect does not use default schema when creating "if exists" statement + * #448 NH-1285 - Drop/Create script with default_schema/default_catalog fix(SqlServer) + +** New Feature + + * #1588 Add a generic batcher for insert/update/delete statements, usable with PostgreSQL and others + * #1545 Support to join not associated entities in Criteria (aka Entity Join) + * #1451 New StaticProxyFactoryFactory + * #1403 Add timeouts support to MultiCriteria + * #1377 Logging refactoring + * #954 NH-3807 - Support for .NET Core 2.0 + * #948 NH-3435 - Ability to select entities in Criteria projections + * #910 NH-3606 - Open a stateless session from a session + * #908 NH-3470 - Allow Linq Query to load entities as read-only + +** Improvement + + * #1600 Set MySqlClientBatchingBatcher as a default batcher for MySqlDataDriver + * #1597 Add support for single-argument truncate to dialects that do not support it natively + * #1569 Modernize test example + * #1567 Avoid Trim().Length as empty check and ToLowerInvariant() in string comparison + * #1561 NAnt refactoring + * #1558 Improved collection batch fetching + * #1557 Aggregate named queries validation exceptions. + * #1555 Catch practices: avoid losing catched exception information. + * #1552 Obsolete UnmodifiableDictionary + * #1549 Remove an override which was doing the same thing as the base + * #1548 Add a missing short circuit in query parameter expansion. + * #1547 Double query translation + * #1546 Remove a redundant argument in Linq provider ExecuteQuery. + * #1543 Various string manipulation optimizations + * #1541 Cache subclass entity aliases in Loader + * #1537 Avoid unnecessary persister lookup in Loader + * #1529 Lazy mapping schema loading + * #1521 Enable warning as error for all projects and configurations + * #1519 Reuse SchemaExport in CreateSchema/DropSchema in tests + * #1515 Make NHibernateUtil.Initialize / IsInitialized better reusable for sub-projects like Envers + * #1504 More reliable SQLite handling in tests. + * #1502 Upgrade Iesi to 4.0.3 in order to use a release assembly + * #1498 Cease throwing bare Exception + * #1494 Update to Oracle installation instructions. + * #1490 Optimize empty arrays usages + * #1483 Clean-up of TypeFactory + * #1482 Refactored DefaultEntityAliases to avoid unnecessary calculations + * #1477 Reuse the same generic EmptyMapClass instance across the project + * #1475 Document expiration constraint on UpdateTimestampsCache region. + * #1467 Reduce the number of calls to UpdateTimestampsCache + * #1466 Obsolete EqualsHelper + * #1465 Obsolete EnumerableExtensions + * #1464 Obsolete ISessionImplementor.Initialize method + * #1449 Document IsDirty potential side effects + * #1441 Normalize TargetInvocationException unwrapping + * #1417 Table counter for aliases should be stable + * #1412 Store Linq query options in a query provider instead of a queryable + * #1391 Performance regression in SessionIdLoggingContext + * #843 NH-3879 - SequenceHiLoGenerator Jumps 1 number each lo > maxLo + * #842 NH-3869 - Add a way of adding comments into LINQ queries + * #837 NH-3804 - Register CHR/CHAR, NCHAR, UNICODE, and ASCII standard functions to the dialect(s) + * #831 NH-3515 - Support for Decimal.Round, Decimal.Ceiling, Decimal.Floor and other static methods of Decimal class + * #768 NH-3921 - Support sequences in Ingres9Dialect + * #769 NH-3922 - The various timeout methods should indicate time unit + +** Task + + * #1610 Move MsSql constants from driver to dialect. + * #1608 Missing Async test for GH1594 + * #1603 Forgotten async generation of truncate test + * #1598 Upgrade IESI to 4.0.4 for having a bumped file version. + * #1589 Add framework info to example web project and enable .NET Core. + * #1574 Fix encoding in NorthwindDbCreator.cs + * #1563 Generate Async test for deep removal of fetch. + * #1527 Adjust ignore rules for not ignoring DebugHelpers folder and contents + * #1525 5.1.0 release + * #1524 Reduce breaking changes due to Ingres9 sequence support + * #1518 Upgrade to AsyncGenerator 0.8.1 + * #1512 Upgrade to NUnit 3.9 + * #1474 Upgrade AsyncGenerator to 0.7.0 + +** Tests + + * #1539 Add more tests for constants in LINQ queries + +As part of releasing 5.1.0, a missing 5.0.0 possible breaking change has been added about inequality semantic in LINQ +queries. See 5.0.0 possible breaking changes. + +Build 5.0.7 +============================= + +Release notes - NHibernate - Version 5.0.7 + + ##### Possible Breaking Changes ##### + * Using DML on an entity collection was applying the changes without + filtering according to the entity. It will now throw a + NotSupportedException. + +** Bug + + * #2043 System.Reflection.TargetException when an interface is used as class mapping proxy definition + * #2020 Throw for DML on filter + +** Task + * #2073 Release 5.0.7 + +Build 5.0.6 +============================= + +Release notes - NHibernate - Version 5.0.6 + +** Bug + * #1672 Generated async methods do not correctly propagate OperationCanceledException + * #1355 NH-3928 - Random invalid SQL generated when using bitwise operators + +** Task + * #1686 Release 5.0.6 + +Build 5.0.5 +============================= + +Release notes - NHibernate - Version 5.0.5 + +** Bug + * #1665 Have IFutureEnumerable.GetEnumerable executing immediatly the query + +Build 5.0.4 +============================= + +Release notes - NHibernate - Version 5.0.4 + +** Bug + * #1658 Add missing cache setting + +Build 5.0.3 +============================= + +Release notes - NHibernate - Version 5.0.3 + +** Bug + * #1462 Fix disposing SessionIdLoggingContext if CheckAndUpdateSessionStatus is failed + +Build 5.0.2 +============================= + +Release notes - NHibernate - Version 5.0.2 + +** Bug + * #1456 NH-4052 - Add missing serializable implementation + * #1455 Reduces check session and set context id redundant calls + * #1453 Eliminate unnecessary AsyncLocal allocation if SessionId isn't changed + +** Task + * #1457 Release 5.0.2 + +As part of releasing 5.0.2, a missing 5.0.0 possible breaking change has been added about Dialects requiring now +to be configured. See 5.0.0 possible breaking changes. + +Build 5.0.1 +============================= + +Release notes - NHibernate - Version 5.0.1 + +** Bug + * #1428 Insert underscore in combined parameter name + * #1424 Bad wording and example fixes in cache documentation. + * #1420 Fix #1419 - ISession.IsDirty() shouldn't throw exception for transient many-to-one object in a session + * #1419 ISession.IsDirty() shouldn't throw exception for transient many-to-one object in a session + * #1418 Column.GetAlias should account for other suffixes + * #1415 Correct MaxAliasLength for various dialects + * #1393 Fix Linq Future aggregates failures, fixes #1387 + * #1389 Add support for out/ref Nullable parameters of proxied methods + * #1387 Linq Sum() with ToFutureValue fails + * #1384 Fix a column spec causing missing col in pdf, fix a text overflow + * #1380 #750 - AliasToBean failure, test case and fix + * #1378 Fix #1362 - Running Unit tests against SQLite fails on datetime/UTC + * #1362 NH-4093 - Running Unit tests against SQLite fails on numerous (22) datetime/UTC related tests. + * #1357 NH-3983 - ToFuture throws ArgumentException at CreateCombinedQueryParameters + * #1179 NH-3840 - Wrong documentation of "cascade" in 5.1.11 (many-to-one) + * #1165 NH-3554 - Docs - bidirectional, indexed collections + * #983 Fix forgotten CDATA closure. + * #879 NH-4006 - Provide a correct MaxAliasLength for various dialects + * #750 Transformers.AliasToBean: Value cannot be null. Parameter name: key + * #712 NH-4092 - AsyncGenerator creates unused private static event handler in SQLite20Driver + +** Improvement + * #1410 Remove unused code in build scripts + * #1404 Use MsBuild for packing .nupkg files + * #1401 Clean up db tests dependencies + * #1395 Documentation fixes + * #1386 Lack of custom logging documentation + * #1382 Jira to GitHub: change issue naming in tests + * #1379 Documentation fixes + * #982 Back port doc fixes + * #824 NH-3208 - Document all possible settings in hibernate.cfg + * #823 NH-3179 - Documentation should note that OnDelete should set IsSaved to false in chapter 24.1 + * #788 NH-1947 - Undocumented attributes on sql-query element + * #713 Switch to GitHub issues + * #711 Switch doc generation to UTF-8. + +** Task + * #1431 Release 5.0.1 + * #1405 Remove unused and broken NHibernate.Setup WiX project + + +Build 5.0.0 +============================= + +** Highlights + * IO bound methods have gained an async counterpart. Not intended for parallelism, make sure to await each + call before further interacting with a session and its queries. + * Strongly typed DML operation (insert/update/delete) are now available as Linq extensions on queryables. + * Entities collections can be queried with .AsQueryable() Linq extension without being fully loaded. + * Reference documentation has been curated and completed, notably with a Linq section. + http://nhibernate.info/doc/nhibernate-reference/index.html + +** Known BREAKING CHANGES from NH4.1.1.GA to 5.0.0 + + NHibernate now targets .Net 4.6.1. + + Remotion.Linq and Antlr3 libraries are no more merged in the NHibernate library, + and must be deployed along NHibernate library. (NuGet will reference them.) + + Classes and members which were flagged as obsolete in the NHibernate 4.x series have been dropped. + Prior to upgrading, fix any obsolete warning according to its message. See NH-4075 and NH-3684 for a list. + + ##### Possible Breaking Changes ##### + * All members exposing some System.Data types have been changed for the corresponding System.Data.Common + types. (IDbCommand => DbCommand, ...) + * The Date NHibernate type will no more replace by null values below its base value (which was year 1753). + Its base value is now DateTime.MinValue. Its configuration parameter is obsolete. + * NHibernate type DateTimeType, which is the default for a .Net DateTime, does no longer cut fractional + seconds. Use DateTimeNoMsType if you wish to have fractional seconds cut. It applies to its Local/Utc + counterparts too. + * LocalDateTimeType and UtcDateTimeType do no more accept being set with a value having a non-matching kind, + they throw instead. + * DbTimestamp will now round the retrieved value according to Dialect.TimestampResolutionInTicks. + * When an object typed property is mapped to a NHibernate timestamp, setting an invalid object in the + property will now throw at flush instead of replacing it with DateTime.Now. + * Decimal type registration now correctly handles maximal precision. For most dialects, it is 28, matching + the .Net limit. Values in mappings above maximal precision will be reduced to maximal precision. + * Default cast types do no more resolve string to 255 length and decimal to its default precision/scale for + the dialect. They resolve to 4000 length string and (28, 10) precision/scale decimals by default, and are + trimmed down according to dialect. Those defaults can be overridden with query.default_cast_length, + query.default_cast_precision and query.default_cast_scale settings. + * Future queries with data provider not actually supporting them (not supporting mutliple queries in a single + SQL command) are no more immediately executed at the .Future call. They are executed only when directly + enumerated or when their IFutureEnumerable.GetEnumerable method is called. (This aligns them with the behavior + of FutureValue.) + * Dialects are now configurable. If you instantiate a dialect directly, make sure you call its Configure + method, with as argument the properties of a NHibernate Configuration object. You may use instead + Dialect.GetDialect methods, which configure the dialect before returning it. + * Transaction scopes handling has undergone a major rework. See NH-4011 for full details. + ** More transaction promotion to distributed may occur if you use the "flush on commit" feature with + transaction scopes. Explicitly flush your session instead. Ensure it does not occur by disabling + transaction.use_connection_on_system_prepare setting. + ** After transaction events no more allow using the connection when they are raised from a scope + completion. + ** Connection enlistment in an ambient transaction is now enforced by NHibernate by default. + ** The connection releasing is no more directly triggered by a scope completion, but by later + interactions with the session. + * AdoNetWithDistributedTransactionFactory has been renamed AdoNetWithSystemTransactionFactory. + * Subcriteria.UniqueResult for value types now return default(T) when result is null, as was + already doing CriteriaImpl.UniqueResult. + * AliasToBeanResultTransformer property/field resolution logic has changed for supporting members + which names differ only by case. See NH-3693 last comments for details. + * Linq inequality implementation has been changed for supporting null, meaning that a "a != b" expression + will now be considered matching if one side is null, while previously due to SQL null semantic it was + considered non-matching. See NH-3100. + * Linq extension methods marked with attribute LinqExtensionMethod will no more be evaluated + in-memory prior to query execution when they do not depend on query results, but will always be + translated to their corresponding SQL call. This can be changed with a parameter of the attribute. + * Linq Query methods are now native members of ISession and IStatelessSession instead of being + extension methods. + * Linq provider now use Remotion.Linq v2, which may break Linq provider extensions, mainly due to names + changes. See https://github.com/nhibernate/nhibernate-core/pull/568 changes to test files for examples. + * NHibernate Linq internals have undergone some minor changes which may break custom Linq providers due + to method signature changes and additional methods to implement. + * IMapping interface has an additional Dialect member. ISessionFactoryImplementor has lost it, since it + gains it back through IMapping. + * IDriver.ExpandQueryParameters and DriverBase.CloneParameter take an additional argument. + * NullableType, its descendent (notably all PrimitiveType) and IUserType value getters and setters now + take the session as an argument. This should mainly impact custom types implementors. + * EmitUtil is now internal and has been cleaned of unused members. + * ContraintOrderedTableKeyColumnClosure has been renamed ConstraintOrderedTableKeyColumnClosure. + * enabledFilter parameter has been removed from IProjection.ToSqlString and ICriterion.ToSqlString methods. + * Proxy factory and proxy cache now use TypeInfo instead of System.Type. This should be transparent for + most users. + * Exceptions which were based on ApplicationException are now based on Exception: HibernateException, + ParserException and AssertionFailure. The logger factory which could throw a bare ApplicationException + now throws an InstantiationException instead. + * ThreadSafeDictionary class has been removed. Use System.Collections.Concurrent.ConcurrentDictionary + instead. + * Entity mode switching capability, which had never been fully implemented, is dropped. + * BytecodeProviderImpl, intended for .Net Framework 1 and broken, is dropped. + * Sessions concrete classes constructors have been changed. (It is not expected for them to be used + directly.) + * Obsolete setting interceptors.beforetransactioncompletion_ignore_exceptions is dropped. + * SQL Server 2008+ dialects now use datetime2 instead of datetime for all date-time types, including + timestamp. This can be reverted with sql_types.keep_datetime setting. + * SQL Server 2008+ timestamp resolution is now 100ns in accordance with datetime2 capabilities, down from + 10ms previously. This can be reverted with sql_types.keep_datetime setting. + * Oracle 9g+ dialects now use timestamp(7) for all date time types, instead of timestamp(4). + * Oracle 9g+ timestamp resolution is now 100ns in accordance with timestamp(7) capabilities, down from + 100µs previously. + * Oracle: Hbm2dll will no-more choose N- prefixed types for typing Unicode string columns by default. + This can be changed with oracle.use_n_prefixed_types_for_unicode setting, which will furthermore + control DbCommand parameters typing accordingly. See NH-4062. + * SqlServerCe: the id generator "native" will now resolve as table-hilo instead of identity. + * Firebird: timestamp resolution is now 1ms. + * PostgreSQL: if Npgsql v3 or later is used, time DbParameters will be fetched as TimeSpan instead of + DateTime. + * DB2 & Oracle lite: decimal type registration was hardcoding precision as 19 and was using length as + scale. It now uses precision and scale from mapping when specified, and disregards length. + * Ingres & Sybase ASA: decimal type registration was hardcoding precision as 18 and was using length as + scale. It now uses precision and scale from mapping when specified, and disregards length. + * ODBC: String parameter length will no more be specified by the OdbcDriver. + + +Release notes - NHibernate - Version 5.0.0 + +** Sub-task + * [NH-3956] - Native SQL query plan may get wrong plan + * [NH-3957] - Second level query cache may yields wrong cache entry + * [NH-4001] - Remove ThreadSafeDictionary + +** Bug + * [NH-926] - Identity insert fails with SQL Ce dialect and aggressive connection release mode. + * [NH-1752] - NHibernate Date type converts to NULL + * [NH-1904] - Protected properties and public properties cannot have the same name with different case + * [NH-2029] - filter-def's use-many-to-one=false should take ON into consideration + * [NH-2145] - AssertionFailure exception at ISession.Save + * [NH-2176] - Consecutive TransactionScopes cannot be used in same NHibernate session + * [NH-2238] - "DTC transaction prepare phase failed" when UPDATE:ing in a promoted TransactionScope + * [NH-2241] - Batch Insert using stateless session when using second level cache throws exception when unable to determine transient status + * [NH-2928] - Connections can only be closed after the Transaction is completed + * [NH-3023] - Deadlocks may cause connection pool corruption when in a distributed transaction + * [NH-3078] - TimeAsTimeSpanType issue when using Sybase Advantage Database + * [NH-3100] - Problem in use if condition for nullable boolean in linq to NHibernate + * [NH-3114] - Collection inside Component cannot be mapped to a different table + * [NH-3227] - InvalidOperationException in AbstractBatcher when distributed transaction is aborted + * [NH-3247] - Char value gets 'cached' in Where-queries + * [NH-3374] - Session.Merge throws InvalidCastException when using a Lazy bytes[] property + * [NH-3600] - ISession.Save returns wrong Id + * [NH-3665] - FirstOrDefault() broken since 3.3.4 and 3.4.0 + * [NH-3693] - AliasToBeanResultTransformerFixture fails under Firebird + * [NH-3755] - Proxy exception for multiple joined-subclass + * [NH-3757] - Dynamic entity mapped with entity-name cannot have a component of a fixed class + * [NH-3793] - Attribute entity-name on is ignored, causing mapping exception + * [NH-3845] - OfType fails with polymorphism + * [NH-3850] - .Count(), .Any() and other aggregates return only first result on polymorphic queries + * [NH-3885] - ThreadSafeDictionary is not threadsafe + * [NH-3889] - Coalesce on entity in sub-select causes incorrect SQL + * [NH-3895] - Problem with DateTime fractional seconds on ODBC for MS SQL Server + * [NH-3911] - Reflection Optimizer tries to cast values to getter type in setter + * [NH-3913] - Component has bag of child components. Child property mapping ignored + * [NH-3931] - Invalid order of child inserts when using TPH inheritance + * [NH-3946] - Linq where "is base class" doesn't get subclasses + * [NH-3948] - CheckAndUpdateSessionStatus() called twice in CreateFilter method inside SessionImpl class + * [NH-3950] - FutureValue fails on Linq queries defining a PostExecuteTransformer + * [NH-3954] - Dynamic proxy cache may yield a wrong proxy + * [NH-3955] - Unreliable Equals implementation + * [NH-3961] - Invalid date parameter format with nullables and MappedAs + * [NH-3966] - Missing command set dispose in batchers + * [NH-3968] - Distributed transaction cannot be committed because AdoNetWithDistributedTransactionFactory tries to write data by using locked sqlConnection + * [NH-3969] - Firebird: TimestampResolutionInTicks should be 1ms + * [NH-3977] - Thread safety weaknesses of MapBasedSessionContext + * [NH-3981] - CollectionHelper.DictionaryEquals throws + * [NH-3985] - ObjectDisposedException is thrown when using a child session after having previously disposed of another child session. + * [NH-3998] - SqlServer CE: "The column aliases must be unique" exception is thrown in some tests + * [NH-4013] - SqlClientBatchingBatcher CloseCommands contract violated + * [NH-4022] - MsSql2012Dialect: Invalid drop sequence statement + * [NH-4024] - ODBC failures with time + * [NH-4027] - Missing disposals of enumerators + * [NH-4035] - Teardown failure should not prevent cleanup + * [NH-4038] - Mapping a TimeSpan in a collection component mapping maps as a BIGINT + * [NH-4046] - Default length too short for variable length types with SAP Anywhere / ASE + * [NH-4077] - Possible race condition in ActionQueue.ExecuteActions + * [NH-4083] - ODBC nvarchar parameter corruption + * [NH-4084] - DbTimestamp cause stale update exception + * [NH-4086] - TimeType may lose fractional seconds + * [NH-4088] - Dialect.GetCastTypeName is buggy + * [NH-4090] - Prepare SQL fails with time parameters and SQL Server 2008+ + * [NH-4091] - SQL Server CE allocates too much memory with blob and sql prepare + +** New Feature + * [NH-1530] - Add support for XmlDocType and XDocType for Oracle + * [NH-2319] - IQueryable support for persistent collections + * [NH-3488] - Strongly Typed Updates and Deletes + * [NH-3771] - Implement setting to enable Batch Update with Optimistic Locking control + * [NH-3905] - Support async: Blocking IO leads to ThreadPool starvation and limits scalability + * [NH-3934] - Add methods WhereNot(ICriterion) and AndNot(ICriterion) in QueryOver + * [NH-3951] - Support .All() result operator + * [NH-3996] - Postgres: add support for XmlDocType and XDocType + * [NH-4009] - Allow marking a Linq extension as db only + * [NH-4017] - Handle Time parameter conversion for newer Npgsql + * [NH-4018] - Port AutoJoinTransaction feature + * [NH-4028] - Support inconclusive tests in result comparison + * [NH-4031] - Add an AsyncLocalSessionContext + * [NH-4032] - Supports multiple factories with ThreadStaticSessionContext + * [NH-4062] - Properly handle Oracle Unicode support dual model + +** Task + * [NH-3683] - Fix Compilation Warnings + * [NH-3958] - Reference documentation: missing types + * [NH-3959] - Fix documentation typos + * [NH-3999] - Document effect of quoted identifier on case sensitivity + * [NH-4000] - Release 5.0 + * [NH-4004] - Restrict tests running on SQL CE + * [NH-4051] - Replace System.Linq.Dynamic with System.Linq.Dynamic.Core in tests + * [NH-4057] - Fix tests for MySql + * [NH-4058] - Fix Oracle managed failing tests + * [NH-4063] - Fix ODBC failing tests + +** Improvement + * [NH-1851] - Mapping a TimeSpan as TimeAsTimeSpan for MySQL + * [NH-2444] - Document linq provider + * [NH-3094] - Linq does not support unary plus and unary minus operators + * [NH-3370] - Remove warning about "NHibernate.Type.CustomType -- the custom type * is not serializable" + * [NH-3386] - Linq OrderBy NewID() + * [NH-3431] - Replace System.Data with System.Data.Common + * [NH-3578] - Subcriteria.UniqueResult for value types should return default(T), same as CriteriaImpl.UniqueResult when result is null + * [NH-3669] - Query should be instance method of ISession + * [NH-3723] - Some tests are failing when log level set to DEBUG + * [NH-3744] - Fixed spelling of ContraintOrderedTableKeyColumnClosure method + * [NH-3750] - Use NuGet to refer to Remotion.Linq (unmerge ReMotion.Linq) + * [NH-3877] - Target .NET 4.6.1 + * [NH-3900] - Upgrade to Nunit 3.x + * [NH-3919] - Clean up and harmonize datetime types with regards to different dialects + * [NH-3927] - Switch to SemVer version scheme + * [NH-3932] - Merge() may fire unnecessary updates if collection and version mapping exists + * [NH-3943] - Use NuGet to reference packages instead of local copies + * [NH-3944] - Upgrade to ReLinq 2 + * [NH-3945] - Update to Antlr 3.5.1 + * [NH-3952] - Cleanup EnumerableHelper usage + * [NH-3962] - Build with MSBuild Tools 2017 (15) + * [NH-3963] - More explicit error on MappedAs invalid usage. + * [NH-3964] - Refactor reflection patterns + * [NH-3970] - TestCase base class: avoid hiding test failure on tear-down + * [NH-3973] - Remove enabledFilter parameter from IProjection.ToSqlString and ICriterion.ToSqlString methods + * [NH-3975] - Synchronize some features dialect support properties + * [NH-3978] - Extract IDatabaseMetadata from DatabaseMetadata + * [NH-3987] - Re-implement NhQueryable options + * [NH-3988] - Replace ApplicationException base class with just Exception + * [NH-3990] - Upgrade to VS2017 Project structure + * [NH-3993] - Component Element Customizer Missing ability to map non-public parents and composite element relations + * [NH-3997] - SqlServer CE: Make native generator to be TableHiLoGenerator + * [NH-4003] - Refactor session constructor + * [NH-4010] - Visual Studio launcher still launches 2015 + * [NH-4014] - Update SQLite assembly for tests + * [NH-4015] - Update Npgsql driver and enable DTC for it in tests + * [NH-4019] - Pass assembly into log4net functions + * [NH-4020] - Use TypeBuilder.CreateTypeInfo() + * [NH-4021] - Track all opened session in tests + * [NH-4023] - Pass ISessionImplementor to all value setters and getters of nullable types + * [NH-4026] - Update Firebird driver and use server in tests + * [NH-4030] - Cleanup and xml doc of Linq Future extension + * [NH-4033] - Update MySql connector used in tests + * [NH-4034] - Flush all sessions participating in a transaction + * [NH-4043] - Complete keyword registration needs done in dialects. + * [NH-4049] - EmitUtil can be cleaned up + * [NH-4050] - Use Task.Run instead of BeginInvoke in tests + * [NH-4052] - Collect schema validation exceptions + * [NH-4064] - Unmerge Antrl3.Runtime + * [NH-4073] - Replace NHibernate.Web.Example with modern version + * [NH-4076] - Do not resurrect session + +** Remove Feature + * [NH-3684] - Remove