text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied.  See the License for the
  specific language governing permissions and limitations
  under the License.
--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>${groupId}</groupId>
        <artifactId>${rootArtifactId}</artifactId>
        <version>${version}</version>
    </parent>

    <artifactId>${artifactId}</artifactId>
    <name>SimpleApp Webapp</name>

    <description>This assemblies and runs both the Wicket viewer and the Restfulobjects viewer in a single webapp configured to run using the datanucleus object store.</description>

    <packaging>war</packaging>

    <properties>

        <isis-maven-plugin.swagger.appManifest>domainapp.application.manifest.DomainAppAppManifest</isis-maven-plugin.swagger.appManifest>
        <isis-maven-plugin.swagger.dependency.groupId>${project.groupId}</isis-maven-plugin.swagger.dependency.groupId>
        <isis-maven-plugin.swagger.dependency.artifactId>${project.parent.artifactId}-application</isis-maven-plugin.swagger.dependency.artifactId>

        <jetty-console-maven-plugin.backgroundImage>${basedir}/src/main/jettyconsole/isis-banner.png</jetty-console-maven-plugin.backgroundImage>

        <maven-war-plugin.warName>${project.parent.artifactId}</maven-war-plugin.warName>
    </properties>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**</include>
                </includes>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <version>1.4</version>
                <configuration>
                    <shortRevisionLength>8</shortRevisionLength>
                    <timestampFormat>{0,date,yyyy-MM-dd HH:mm:ss}</timestampFormat>
                </configuration>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.8</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>maven-version</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.github.odavid.maven.plugins</groupId>
                <artifactId>mixin-maven-plugin</artifactId>
                <version>0.1-alpha-39</version>
                <extensions>true</extensions>
                <configuration>
                    <mixins>
                        <mixin>
                            <groupId>com.danhaywood.mavenmixin</groupId>
                            <artifactId>standard</artifactId>
                            <version>${mavenmixin-standard.version}</version>
                        </mixin>
                        <mixin>
                            <groupId>com.danhaywood.mavenmixin</groupId>
                            <artifactId>enforcerrelaxed</artifactId>
                            <version>${mavenmixin-enforcerrelaxed.version}</version>
                        </mixin>
                        <mixin>
                            <groupId>com.danhaywood.mavenmixin</groupId>
                            <artifactId>isisswagger</artifactId>
                            <version>${mavenmixin-isisswagger.version}</version>
                        </mixin>
                        <mixin>
                            <groupId>com.danhaywood.mavenmixin</groupId>
                            <artifactId>jettywar</artifactId>
                            <version>${mavenmixin-jettywar.version}</version>
                        </mixin>
                        <mixin>
                            <groupId>com.danhaywood.mavenmixin</groupId>
                            <artifactId>jettyconsole</artifactId>
                            <version>${mavenmixin-jettyconsole.version}</version>
                        </mixin>
                    </mixins>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>

        <!-- this app -->
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>${rootArtifactId}-application</artifactId>
        </dependency>

        <!-- isis -->
        <dependency>
            <groupId>com.danhaywood.mavendeps</groupId>
            <artifactId>isiswebapp</artifactId>
            <version>${mavendeps-isiswebapp.version}</version>
            <type>pom</type>
        </dependency>

        <dependency>
            <groupId>com.danhaywood.mavendeps</groupId>
            <artifactId>isisintellij</artifactId>
            <version>${mavendeps-isisintellij.version}</version>
            <type>pom</type>
        </dependency>
    </dependencies>

    <profiles>

        <profile>
            <id>jdbc-hsqldb</id>
            <activation>
                <property>
                    <name>!skip.jdbc-hsqldb</name>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.hsqldb</groupId>
                    <artifactId>hsqldb</artifactId>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>jdbc-logging</id>
            <activation>
                <property>
                    <name>!skip.jdbc-logging</name>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.lazyluke</groupId>
                    <artifactId>log4jdbc-remix</artifactId>
                    <exclusions>
                        <exclusion>
                            <groupId>org.slf4j</groupId>
                            <artifactId>slf4j-api</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
            </dependencies>
        </profile>
        <!--
        <profile>
            <id>jdbc-postgres</id>
            <activation>
                <property>
                    <name>!skip.jdbc-postgres</name>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>postgresql</groupId>
                    <artifactId>postgresql</artifactId>
                    <version>9.1-901.jdbc4</version>
                </dependency>
            </dependencies>
        </profile>
        -->
        <!--
        <profile>
            <id>jdbc-mssql</id>
            <activation>
                <property>
                    <name>!skip.jdbc-mssql</name>
                </property>
            </activation>

            mvn install:install-file -Dfile=sqljdbc4.jar \
                                     -DgroupId=com.microsoft.sqlserver \
                                     -DartifactId=jdbc \
                                     -Dversion=4.0 \
                                     -Dpackaging=jar

            <dependencies>
               <dependency>
                   <groupId>com.microsoft.sqlserver</groupId>
                   <artifactId>sqljdbc4</artifactId>
                   <version>4.0</version>
               </dependency>
            </dependencies>
        </profile>
        -->
    </profiles>

</project>


text:
package org.apache.sshd.sftp.server;

import java.nio.file.attribute.GroupPrincipal;

/**
 * @author Apache MINA SSHD Project
 */
public class DefaultGroupPrincipal extends PrincipalBase implements GroupPrincipal {

    public DefaultGroupPrincipal(String name) {
        super(name);
    }

}

redpajama_set_name: RedPajamaGithub


text:
export sns_delete_topic, sns_create_topic, sns_subscribe_sqs,
       sns_subscribe_email, sns_publish

sns_arn(aws, topic_name) = arn(aws, "sns", topic_name)

sns(aws, query) = do_request(post_request(aws, "sns", "2010-03-31", query))

function sns(aws, action, topic; args...)

    sns(aws, merge(StringDict(args),
                   "Action" => action,
                   "Name" => topic,
                   "TopicArn" => sns_arn(aws, topic)))
end

function sns_create_topic(aws, topic_name)

    sns(aws, "CreateTopic", topic_name)
end

function sns_delete_topic(aws, topic_name)

    sns(aws, "DeleteTopic", topic_name)
end

function sns_publish(aws, topic_name, message, subject="No Subject")

    if length(subject) > 100
        subject = subject[1:100]
    end
    sns(aws, "Publish", topic_name, Message = message, Subject = subject)
end

function sns_subscribe_sqs(aws, topic_name, queue; raw=flase)

    r = sns(aws, Dict("Action" => "Subscribe",
                      "Name" => topic_name,
                      "TopicArn" => sns_arn(aws, topic_name),
                      "Endpoint" => sqs_arn(queue),
                      "Protocol" => "sqs"))

    if raw
        arn = r["SubscriptionArn"]
        sns(aws, "SetSubscriptionAttributes", topic_name,
                  SubscriptionArn = arn,
                  AttributeName = "RawMessageDelivery",
                  AttributeValue = "true")
    end

    sqs(queue, Dict(
        "Action" => "SetQueueAttributes",
        "Attribute.Name" => "Policy",
        "Attribute.Value" => """{
          "Version": "2008-10-17",
          "Statement": [
            {
              "Effect": "Allow",
              "Principal": {
                "AWS": "*"
              },
              "Action": "SQS:SendMessage",
              "Resource": "$(sqs_arn(queue))",
              "Condition": {
                "ArnEquals": {
                  "aws:SourceArn": "$(sns_arn(aws, topic_name))"
                }
              }
            }
          ]
        }"""
    ))
end

function sns_subscribe_email(aws, topic_name, email)

    sns(aws, topic_name, "Subscribe", Endpoint = email, Protocol = "email")
end

#==============================================================================#
# End of file.
#==============================================================================#


text:
Point::Point()
{
}

Point::~Point()
{
}

const unordered_map<string, double>& Point::GetCoordinates() const
{
	return coordinates;
}

void Point::Insert(const string& varName, double value)
{
	coordinates[varName] = value;
}

Point Point::operator+(const Point& rhv) const
{
	Point result;

	for (auto& i : coordinates)
	{
		try
		{
			result.coordinates[i.first] = i.second + rhv.coordinates.at(i.first);
		}
		catch (out_of_range ex)
		{
			continue;
		}
	}

	return result;
}

Point Point::operator-(const Point& rhv) const
{
	Point result;

	for (auto& i : coordinates)
	{
		try
		{
			result.coordinates[i.first] = i.second - rhv.coordinates.at(i.first);
		}
		catch (out_of_range ex)
		{
			continue;
		}
	}

	return result;
}

double Point::operator*(const Point& rhv) const
{
	double result = 0.0;

	for (auto& i : coordinates)
	{
		try
		{
			result += i.second * rhv.coordinates.at(i.first);
		}
		catch (out_of_range ex)
		{
			continue;
		}
	}

	return result;
}

Point Point::operator*(double scalar) const
{
	Point result;

	for (auto& i : coordinates)
	{
		result.coordinates[i.first] = i.second * scalar;
	}

	return result;
}

Point Point::operator/(double scalar) const
{
	Point result;

	for (auto& i : coordinates)
	{
		result.coordinates[i.first] = i.second / scalar;
	}

	return result;
}

void Point::operator+=(const Point& rhv)
{
	for (auto& i : rhv.coordinates)
	{
		coordinates[i.first] += i.second;
	}
}

void Point::operator-=(const Point& rhv)
{
	for (auto& i : rhv.coordinates)
	{
		coordinates[i.first] -= i.second;
	}
}

void Point::operator*=(double scalar)
{
	for (auto& i : coordinates)
	{
		i.second *= scalar;
	}
}

void Point::operator/=(double scalar)
{
	for (auto& i : coordinates)
	{
		i.second /= scalar;
	}
}


text:
package com.airhacks.enhydrator.transform;

import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.Map;
import java.util.Objects;

/**
 *
 * @author airhacks.com
 */
public class ResourceFunctionScriptLoader extends FunctionScriptLoader {

    public ResourceFunctionScriptLoader(Map<String, Object> scriptEngineBindings) {
        super("/", scriptEngineBindings);
    }

    @Override
    public Reader load(String scriptFolder, String name) {
        String resourceName = this.baseFolder + scriptFolder + "/" + name + ".js";
        InputStream resourceAsStream = ResourceFunctionScriptLoader.class.getClassLoader().getResourceAsStream(resourceName);
        Objects.requireNonNull(resourceAsStream, "Cannot load function: " + name + " from: " + resourceName);
        return new InputStreamReader(resourceAsStream);
    }

}


text: Eventually::Application.config.session_store :cookie_store, key: '_eventually_session'


text:
using CodeCop.Core;
using CodeCop.Setup.Contracts;

namespace CodeCop.Setup.Infrastructure
{
    /// <summary>
    /// This type signalizes that the configuration has been completed and is ready to be applied to <see cref="CodeCop"/>.
    /// </summary>
    public class CopConfiguration
    {
        private readonly IContainer container;

        internal CopConfiguration(IContainer container)
        {
            this.container = container;
        }

        /// <summary>
        /// Activates the interceptor.
        /// </summary>
        public void Activate()
        {
            Cop.AsFluent();
            Cop.Intercept();
        }
    }
}


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2008.06.17 at 03:33:40 PM PDT
//

package com.acl.ax.datasource.mapsdk.xml.binding;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.NormalizedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

/**
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
@XmlRootElement(name = "XMLTEXT")
public class XMLTEXT {

    @XmlAttribute(name = "TYPE", required = true)
    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
    protected String type;
    @XmlAttribute(name = "NAMESPACE")
    @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
    protected String namespace;
    @XmlAttribute(name = "TEXT", required = true)
    @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
    protected String text;

    /**
     * Gets the value of the type property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getTYPE() {
        return type;
    }

    /**
     * Sets the value of the type property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setTYPE(String value) {
        this.type = value;
    }

    /**
     * Gets the value of the namespace property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getNAMESPACE() {
        return namespace;
    }

    /**
     * Sets the value of the namespace property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setNAMESPACE(String value) {
        this.namespace = value;
    }

    /**
     * Gets the value of the text property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getTEXT() {
        return text;
    }

    /**
     * Sets the value of the text property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setTEXT(String value) {
        this.text = value;
    }

}


text:
#import <Foundation/Foundation.h>
#import "WXSDKInstance.h"
#import "WXComponentManager.h"
#import "WXModuleMethod.h"
#import "WXThreadSafeMutableDictionary.h"
#import <JavaScriptCore/JavaScriptCore.h>

@interface WXSDKInstance ()

@property (nonatomic, assign) CGFloat viewportWidth;

@property (nonatomic, strong) WXThreadSafeMutableDictionary *moduleInstances;
@property (nonatomic, strong) NSMutableDictionary *naviBarStyles;
@property (nonatomic, strong) NSMutableDictionary *styleConfigs;
@property (nonatomic, strong) NSMutableDictionary *attrConfigs;
@property (nonatomic, strong) NSString *mainBundleString;

// add monitor information
@property (nonatomic, strong) NSString *callCreateInstanceContext;
@property (nonatomic, strong) NSString *createInstanceContextResult;
@property (nonatomic, strong) NSString *executeRaxApiResult;

@property (nonatomic, readonly, strong) WXComponentManager *componentManager;

- (void)addModuleEventObservers:(NSString*)event callback:(NSString*)callbackId option:(NSDictionary*)option moduleClassName:(NSString*)moduleClassName;
- (void)_addModuleEventObserversWithModuleMethod:(WXModuleMethod*)method;
- (void)removeModuleEventObserver:(NSString*)event moduleClassName:(NSString*)moduleClassName;
- (void)_removeModuleEventObserverWithModuleMethod:(WXModuleMethod*)method;

@end


text:
package org.abimon.mods.minecraft.minegate.client;

import org.lwjgl.opengl.GL11;

import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;

public class DHDRenderer extends TileEntitySpecialRenderer {

	//The model of your block
	private final DialHomeDevice model;
	private final DialHomeDevice model2;
	private final DialHomeDevice model3;

	public DHDRenderer() {
		this.model = new DialHomeDevice(true, false);
		this.model2 = new DialHomeDevice(false, false);
		this.model3 = new DialHomeDevice(false, true);
	}

	private void adjustRotatePivotViaMeta(World world, int x, int y, int z) {
		int meta = world.getBlockMetadata(x, y, z);
		GL11.glPushMatrix();
		GL11.glRotatef(meta * (-90), 0.0F, 0.0F, 1.0F);
		GL11.glPopMatrix();
	}

	@Override
	public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale) {
		//The PushMatrix tells the renderer to "start" doing something.
		GL11.glPushMatrix();
		//This is setting the initial location.
		GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);

		//This rotation part is very important! Without it, your model will render upside-down! And for some reason you DO need PushMatrix again!
		GL11.glPushMatrix();
		GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
		//A reference to your Model file. Again, very important.
		this.model.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
		this.model2.setTileEntity(te);
		this.model2.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
		this.model3.setTileEntity(te);
		this.model3.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
		//Tell it to stop rendering for both the PushMatrix's
		GL11.glPopMatrix();
		GL11.glPopMatrix();
	}

	//Set the lighting stuff, so it changes it's brightness properly.
	private void adjustLightFixture(World world, int i, int j, int k, Block block) {
		Tessellator tess = Tessellator.instance;
		//float brightness = block.getBlockBrightness(world, i, j, k);
		//As of MC 1.7+ block.getBlockBrightness() has become block.getLightValue():
		float brightness = block.getLightValue(world, i, j, k);
		int skyLight = world.getLightBrightnessForSkyBlocks(i, j, k, 0);
		int modulousModifier = skyLight % 65536;
		int divModifier = skyLight / 65536;
		tess.setColorOpaque_F(brightness, brightness, brightness);
		OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit,  (float) modulousModifier,  divModifier);
	}

}


text:
describe('Maze checkMazeValue', function() {

    var maze;

    beforeEach(function() {
      maze = new Maze({
        maze: '7 5\n1110001\n0010001\n1111111\n0000101\n1111101',
        start: [
          { x: 6, y: 0, label: 'A' },
          { x: 0, y: 4, label: 'B' },
          { x: 6, y: 4, label: 'C' }
        ],
        end: [ { x: 0, y: 0, label: 'X' } ]
      });
    });

    it('Should throw an Error with message `Maze symbol at line 2 and col 1 should be 0 or 1, but it\'s equal to: a`', function() {
      expect(maze.checkMazeValue.bind(maze, 2, 'a', 1)).toThrowError('Maze symbol at line 2 and col 1 should be 0 or 1, but it\'s equal to: a');
    });

    it('Should throw an Error with message `Maze symbol at line 2 and col 1 should be 0 or 1, but it\'s equal to: 5`', function() {
      expect(maze.checkMazeValue.bind(maze, 2, '5', 1)).toThrowError('Maze symbol at line 2 and col 1 should be 0 or 1, but it\'s equal to: 5');
    });

    it('Should throw an Error with message `Maze symbol at line 2 and col 1 should be 0 or 1, but it\'s equal to: 5` (integer)', function() {
      expect(maze.checkMazeValue.bind(maze, 2, 5, 1)).toThrowError('Maze symbol at line 2 and col 1 should be 0 or 1, but it\'s equal to: 5');
    });

    it('Should return integer zero', function() {
      expect(maze.checkMazeValue(2, '0', 1) === 0).toBeTruthy();
    });

    it('Should return integer 1', function() {
      expect(maze.checkMazeValue(2, '1', 1) === 1).toBeTruthy();
    });

    it('Should return integer zero', function() {
      expect(maze.checkMazeValue(2, 0, 1) === 0).toBeTruthy();
    });

    it('Should return integer 1', function() {
      expect(maze.checkMazeValue(2, 1, 1) === 1).toBeTruthy();
    });
});


text:
'===============================================================================
'  Generated From - VbNet_dOOdads_BusinessEntity.vbgen
'
'  ** IMPORTANT  **
'  How to Generate your stored procedures:
'
'  SQL        = SQL_StoredProcs.vbgen
'  ACCESS     = Access_StoredProcs.vbgen
'  ORACLE     = Oracle_StoredProcs.vbgen
'  FIREBIRD   = FirebirdStoredProcs.vbgen
'  POSTGRESQL = PostgreSQL_StoredProcs.vbgen
'
'  The supporting base class SqlClientEntity is in the Architecture directory in "dOOdads".
'
'  This object is 'MustInherit' which means you need to inherit from it to be able
'  to instantiate it.  This is very easilly done. You can Override properties and
'  methods in your derived class, this allows you to regenerate this class at any
'  time and not worry about overwriting custom code.
'
'  NEVER EDIT THIS FILE.
'
'  Public Class YourObject
'    Inherits _YourObject
'
'  End Class
'
'===============================================================================

' Generated by MyGeneration Version # (1.1.3.0)

Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Collections
Imports System.Collections.Specialized

Imports MyGeneration.dOOdads

Public MustInherit Class _Employees
	Inherits SqlClientEntity

	Public Sub New()
		Me.QuerySource = "Employees"
		Me.MappingName = "Employees"
	End Sub

	'=================================================================
	'  Public Overrides Sub AddNew()
	'=================================================================
	'
	'=================================================================
	Public Overrides Sub AddNew()
		MyBase.AddNew()

	End Sub

	Public Overrides Sub FlushData()
		Me._whereClause = Nothing
		Me._aggregateClause = Nothing
		MyBase.FlushData()
	End Sub

	'=================================================================
	'  	Public Function LoadAll() As Boolean
	'=================================================================
	'  Loads all of the records in the database, and sets the currentRow to the first row
	'=================================================================
	Public Function LoadAll() As Boolean

		Dim parameters As ListDictionary = Nothing

		Return MyBase.LoadFromSql("[" + Me.SchemaStoredProcedure + "proc_EmployeesLoadAll]", parameters)

	End Function

	'=================================================================
	' Public Overridable Function LoadByPrimaryKey()  As Boolean
	'=================================================================
	'  Loads a single row of via the primary key
	'=================================================================
	Public Overridable Function LoadByPrimaryKey(ByVal EmployeeID As Integer) As Boolean

		Dim parameters As ListDictionary = New ListDictionary
		parameters.Add(Me.Parameters.EmployeeID, EmployeeID)

		Return MyBase.LoadFromSql("[" + Me.SchemaStoredProcedure + "proc_EmployeesLoadByPrimaryKey]", parameters)

	End Function

#Region "Parameters"
	Protected Class Parameters

		Public Shared ReadOnly Property EmployeeID() As SqlParameter
			Get
				Return New SqlParameter("@EmployeeID", SqlDbType.Int, 0)
			End Get
		End Property

		Public Shared ReadOnly Property LastName() As SqlParameter
			Get
				Return New SqlParameter("@LastName", SqlDbType.NVarChar, 20)
			End Get
		End Property

		Public Shared ReadOnly Property FirstName() As SqlParameter
			Get
				Return New SqlParameter("@FirstName", SqlDbType.NVarChar, 10)
			End Get
		End Property

		Public Shared ReadOnly Property Title() As SqlParameter
			Get
				Return New SqlParameter("@Title", SqlDbType.NVarChar, 30)
			End Get
		End Property

		Public Shared ReadOnly Property TitleOfCourtesy() As SqlParameter
			Get
				Return New SqlParameter("@TitleOfCourtesy", SqlDbType.NVarChar, 25)
			End Get
		End Property

		Public Shared ReadOnly Property BirthDate() As SqlParameter
			Get
				Return New SqlParameter("@BirthDate", SqlDbType.DateTime, 0)
			End Get
		End Property

		Public Shared ReadOnly Property HireDate() As SqlParameter
			Get
				Return New SqlParameter("@HireDate", SqlDbType.DateTime, 0)
			End Get
		End Property

		Public Shared ReadOnly Property Address() As SqlParameter
			Get
				Return New SqlParameter("@Address", SqlDbType.NVarChar, 60)
			End Get
		End Property

		Public Shared ReadOnly Property City() As SqlParameter
			Get
				Return New SqlParameter("@City", SqlDbType.NVarChar, 15)
			End Get
		End Property

		Public Shared ReadOnly Property Region() As SqlParameter
			Get
				Return New SqlParameter("@Region", SqlDbType.NVarChar, 15)
			End Get
		End Property

		Public Shared ReadOnly Property PostalCode() As SqlParameter
			Get
				Return New SqlParameter("@PostalCode", SqlDbType.NVarChar, 10)
			End Get
		End Property

		Public Shared ReadOnly Property Country() As SqlParameter
			Get
				Return New SqlParameter("@Country", SqlDbType.NVarChar, 15)
			End Get
		End Property

		Public Shared ReadOnly Property HomePhone() As SqlParameter
			Get
				Return New SqlParameter("@HomePhone", SqlDbType.NVarChar, 24)
			End Get
		End Property

		Public Shared ReadOnly Property Extension() As SqlParameter
			Get
				Return New SqlParameter("@Extension", SqlDbType.NVarChar, 4)
			End Get
		End Property

		Public Shared ReadOnly Property Photo() As SqlParameter
			Get
				Return New SqlParameter("@Photo", SqlDbType.Image, 2147483647)
			End Get
		End Property

		Public Shared ReadOnly Property Notes() As SqlParameter
			Get
				Return New SqlParameter("@Notes", SqlDbType.NText, 1073741823)
			End Get
		End Property

		Public Shared ReadOnly Property ReportsTo() As SqlParameter
			Get
				Return New SqlParameter("@ReportsTo", SqlDbType.Int, 0)
			End Get
		End Property

		Public Shared ReadOnly Property PhotoPath() As SqlParameter
			Get
				Return New SqlParameter("@PhotoPath", SqlDbType.NVarChar, 255)
			End Get
		End Property

	End Class
#End Region

#Region "ColumnNames"
	Public Class ColumnNames

		Public Const EmployeeID As String = "EmployeeID"
		Public Const LastName As String = "LastName"
		Public Const FirstName As String = "FirstName"
		Public Const Title As String = "Title"
		Public Const TitleOfCourtesy As String = "TitleOfCourtesy"
		Public Const BirthDate As String = "BirthDate"
		Public Const HireDate As String = "HireDate"
		Public Const Address As String = "Address"
		Public Const City As String = "City"
		Public Const Region As String = "Region"
		Public Const PostalCode As String = "PostalCode"
		Public Const Country As String = "Country"
		Public Const HomePhone As String = "HomePhone"
		Public Const Extension As String = "Extension"
		Public Const Photo As String = "Photo"
		Public Const Notes As String = "Notes"
		Public Const ReportsTo As String = "ReportsTo"
		Public Const PhotoPath As String = "PhotoPath"

		Public Shared Function ToPropertyName(ByVal columnName As String) As String

			If ht Is Nothing Then

				ht = New Hashtable

				ht(EmployeeID) = _Employees.PropertyNames.EmployeeID
				ht(LastName) = _Employees.PropertyNames.LastName
				ht(FirstName) = _Employees.PropertyNames.FirstName
				ht(Title) = _Employees.PropertyNames.Title
				ht(TitleOfCourtesy) = _Employees.PropertyNames.TitleOfCourtesy
				ht(BirthDate) = _Employees.PropertyNames.BirthDate
				ht(HireDate) = _Employees.PropertyNames.HireDate
				ht(Address) = _Employees.PropertyNames.Address
				ht(City) = _Employees.PropertyNames.City
				ht(Region) = _Employees.PropertyNames.Region
				ht(PostalCode) = _Employees.PropertyNames.PostalCode
				ht(Country) = _Employees.PropertyNames.Country
				ht(HomePhone) = _Employees.PropertyNames.HomePhone
				ht(Extension) = _Employees.PropertyNames.Extension
				ht(Photo) = _Employees.PropertyNames.Photo
				ht(Notes) = _Employees.PropertyNames.Notes
				ht(ReportsTo) = _Employees.PropertyNames.ReportsTo
				ht(PhotoPath) = _Employees.PropertyNames.PhotoPath

			End If

			Return CType(ht(columnName), String)

		End Function

		Private Shared ht As Hashtable = Nothing
	End Class
#End Region

#Region "PropertyNames"
	Public Class PropertyNames

		Public Const EmployeeID As String = "EmployeeID"
		Public Const LastName As String = "LastName"
		Public Const FirstName As String = "FirstName"
		Public Const Title As String = "Title"
		Public Const TitleOfCourtesy As String = "TitleOfCourtesy"
		Public Const BirthDate As String = "BirthDate"
		Public Const HireDate As String = "HireDate"
		Public Const Address As String = "Address"
		Public Const City As String = "City"
		Public Const Region As String = "Region"
		Public Const PostalCode As String = "PostalCode"
		Public Const Country As String = "Country"
		Public Const HomePhone As String = "HomePhone"
		Public Const Extension As String = "Extension"
		Public Const Photo As String = "Photo"
		Public Const Notes As String = "Notes"
		Public Const ReportsTo As String = "ReportsTo"
		Public Const PhotoPath As String = "PhotoPath"

		Public Shared Function ToColumnName(ByVal propertyName As String) As String

			If ht Is Nothing Then

				ht = New Hashtable

				ht(EmployeeID) = _Employees.ColumnNames.EmployeeID
				ht(LastName) = _Employees.ColumnNames.LastName
				ht(FirstName) = _Employees.ColumnNames.FirstName
				ht(Title) = _Employees.ColumnNames.Title
				ht(TitleOfCourtesy) = _Employees.ColumnNames.TitleOfCourtesy
				ht(BirthDate) = _Employees.ColumnNames.BirthDate
				ht(HireDate) = _Employees.ColumnNames.HireDate
				ht(Address) = _Employees.ColumnNames.Address
				ht(City) = _Employees.ColumnNames.City
				ht(Region) = _Employees.ColumnNames.Region
				ht(PostalCode) = _Employees.ColumnNames.PostalCode
				ht(Country) = _Employees.ColumnNames.Country
				ht(HomePhone) = _Employees.ColumnNames.HomePhone
				ht(Extension) = _Employees.ColumnNames.Extension
				ht(Photo) = _Employees.ColumnNames.Photo
				ht(Notes) = _Employees.ColumnNames.Notes
				ht(ReportsTo) = _Employees.ColumnNames.ReportsTo
				ht(PhotoPath) = _Employees.ColumnNames.PhotoPath

			End If

			Return CType(ht(propertyName), String)

		End Function

		Private Shared ht As Hashtable = Nothing

	End Class
#End Region

#Region "StringPropertyNames"
	Public Class StringPropertyNames

		Public Const EmployeeID As String = "s_EmployeeID"
		Public Const LastName As String = "s_LastName"
		Public Const FirstName As String = "s_FirstName"
		Public Const Title As String = "s_Title"
		Public Const TitleOfCourtesy As String = "s_TitleOfCourtesy"
		Public Const BirthDate As String = "s_BirthDate"
		Public Const HireDate As String = "s_HireDate"
		Public Const Address As String = "s_Address"
		Public Const City As String = "s_City"
		Public Const Region As String = "s_Region"
		Public Const PostalCode As String = "s_PostalCode"
		Public Const Country As String = "s_Country"
		Public Const HomePhone As String = "s_HomePhone"
		Public Const Extension As String = "s_Extension"
		Public Const Photo As String = "s_Photo"
		Public Const Notes As String = "s_Notes"
		Public Const ReportsTo As String = "s_ReportsTo"
		Public Const PhotoPath As String = "s_PhotoPath"

	End Class
#End Region

#Region "Properties"
	Public Overridable Property EmployeeID() As Integer
		Get
			Return MyBase.GetInteger(ColumnNames.EmployeeID)
		End Get
		Set(ByVal Value As Integer)
			MyBase.SetInteger(ColumnNames.EmployeeID, Value)
		End Set
	End Property

	Public Overridable Property LastName() As String
		Get
			Return MyBase.GetString(ColumnNames.LastName)
		End Get
		Set(ByVal Value As String)
			MyBase.SetString(ColumnNames.LastName, Value)
		End Set
	End Property

	Public Overridable Property FirstName() As String
		Get
			Return MyBase.GetString(ColumnNames.FirstName)
		End Get
		Set(ByVal Value As String)
			MyBase.SetString(ColumnNames.FirstName, Value)
		End Set
	End Property

	Public Overridable Property Title() As String
		Get
			Return MyBase.GetString(ColumnNames.Title)
		End Get
		Set(ByVal Value As String)
			MyBase.SetString(ColumnNames.Title, Value)
		End Set
	End Property

	Public Overridable Property TitleOfCourtesy() As String
		Get
			Return MyBase.GetString(ColumnNames.TitleOfCourtesy)
		End Get
		Set(ByVal Value As String)
			MyBase.SetString(ColumnNames.TitleOfCourtesy, Value)
		End Set
	End Property

	Public Overridable Property BirthDate() As DateTime
		Get
			Return MyBase.GetDateTime(ColumnNames.BirthDate)
		End Get
		Set(ByVal Value As DateTime)
			MyBase.SetDateTime(ColumnNames.BirthDate, Value)
		End Set
	End Property

	Public Overridable Property HireDate() As DateTime
		Get
			Return MyBase.GetDateTime(ColumnNames.HireDate)
		End Get
		Set(ByVal Value As DateTime)
			MyBase.SetDateTime(ColumnNames.HireDate, Value)
		End Set
	End Property

	Public Overridable Property Address() As String
		Get
			Return MyBase.GetString(ColumnNames.Address)
		End Get
		Set(ByVal Value As String)
			MyBase.SetString(ColumnNames.Address, Value)
		End Set
	End Property

	Public Overridable Property City() As String
		Get
			Return MyBase.GetString(ColumnNames.City)
		End Get
		Set(ByVal Value As String)
			MyBase.SetString(ColumnNames.City, Value)
		End Set
	End Property

	Public Overridable Property Region() As String
		Get
			Return MyBase.GetString(ColumnNames.Region)
		End Get
		Set(ByVal Value As String)
			MyBase.SetString(ColumnNames.Region, Value)
		End Set
	End Property

	Public Overridable Property PostalCode() As String
		Get
			Return MyBase.GetString(ColumnNames.PostalCode)
		End Get
		Set(ByVal Value As String)
			MyBase.SetString(ColumnNames.PostalCode, Value)
		End Set
	End Property

	Public Overridable Property Country() As String
		Get
			Return MyBase.GetString(ColumnNames.Country)
		End Get
		Set(ByVal Value As String)
			MyBase.SetString(ColumnNames.Country, Value)
		End Set
	End Property

	Public Overridable Property HomePhone() As String
		Get
			Return MyBase.GetString(ColumnNames.HomePhone)
		End Get
		Set(ByVal Value As String)
			MyBase.SetString(ColumnNames.HomePhone, Value)
		End Set
	End Property

	Public Overridable Property Extension() As String
		Get
			Return MyBase.GetString(ColumnNames.Extension)
		End Get
		Set(ByVal Value As String)
			MyBase.SetString(ColumnNames.Extension, Value)
		End Set
	End Property

	Public Overridable Property Photo() As Byte()
		Get
			Return MyBase.GetByteArray(ColumnNames.Photo)
		End Get
		Set(ByVal Value As Byte())
			MyBase.SetByteArray(ColumnNames.Photo, Value)
		End Set
	End Property

	Public Overridable Property Notes() As String
		Get
			Return MyBase.GetString(ColumnNames.Notes)
		End Get
		Set(ByVal Value As String)
			MyBase.SetString(ColumnNames.Notes, Value)
		End Set
	End Property

	Public Overridable Property ReportsTo() As Integer
		Get
			Return MyBase.GetInteger(ColumnNames.ReportsTo)
		End Get
		Set(ByVal Value As Integer)
			MyBase.SetInteger(ColumnNames.ReportsTo, Value)
		End Set
	End Property

	Public Overridable Property PhotoPath() As String
		Get
			Return MyBase.GetString(ColumnNames.PhotoPath)
		End Get
		Set(ByVal Value As String)
			MyBase.SetString(ColumnNames.PhotoPath, Value)
		End Set
	End Property

#End Region

#Region "String Properties"

	Public Overridable Property s_EmployeeID() As String
		Get
			If Me.IsColumnNull(ColumnNames.EmployeeID) Then
				Return String.Empty
			Else
				Return MyBase.GetIntegerAsString(ColumnNames.EmployeeID)
			End If
		End Get
		Set(ByVal Value As String)
			If String.Empty = value Then
				Me.SetColumnNull(ColumnNames.EmployeeID)
			Else
				Me.EmployeeID = MyBase.SetIntegerAsString(ColumnNames.EmployeeID, Value)
			End If
		End Set
	End Property

	Public Overridable Property s_LastName() As String
		Get
			If Me.IsColumnNull(ColumnNames.LastName) Then
				Return String.Empty
			Else
				Return MyBase.GetStringAsString(ColumnNames.LastName)
			End If
		End Get
		Set(ByVal Value As String)
			If String.Empty = value Then
				Me.SetColumnNull(ColumnNames.LastName)
			Else
				Me.LastName = MyBase.SetStringAsString(ColumnNames.LastName, Value)
			End If
		End Set
	End Property

	Public Overridable Property s_FirstName() As String
		Get
			If Me.IsColumnNull(ColumnNames.FirstName) Then
				Return String.Empty
			Else
				Return MyBase.GetStringAsString(ColumnNames.FirstName)
			End If
		End Get
		Set(ByVal Value As String)
			If String.Empty = value Then
				Me.SetColumnNull(ColumnNames.FirstName)
			Else
				Me.FirstName = MyBase.SetStringAsString(ColumnNames.FirstName, Value)
			End If
		End Set
	End Property

	Public Overridable Property s_Title() As String
		Get
			If Me.IsColumnNull(ColumnNames.Title) Then
				Return String.Empty
			Else
				Return MyBase.GetStringAsString(ColumnNames.Title)
			End If
		End Get
		Set(ByVal Value As String)
			If String.Empty = value Then
				Me.SetColumnNull(ColumnNames.Title)
			Else
				Me.Title = MyBase.SetStringAsString(ColumnNames.Title, Value)
			End If
		End Set
	End Property

	Public Overridable Property s_TitleOfCourtesy() As String
		Get
			If Me.IsColumnNull(ColumnNames.TitleOfCourtesy) Then
				Return String.Empty
			Else
				Return MyBase.GetStringAsString(ColumnNames.TitleOfCourtesy)
			End If
		End Get
		Set(ByVal Value As String)
			If String.Empty = value Then
				Me.SetColumnNull(ColumnNames.TitleOfCourtesy)
			Else
				Me.TitleOfCourtesy = MyBase.SetStringAsString(ColumnNames.TitleOfCourtesy, Value)
			End If
		End Set
	End Property

	Public Overridable Property s_BirthDate() As String
		Get
			If Me.IsColumnNull(ColumnNames.BirthDate) Then
				Return String.Empty
			Else
				Return MyBase.GetDateTimeAsString(ColumnNames.BirthDate)
			End If
		End Get
		Set(ByVal Value As String)
			If String.Empty = value Then
				Me.SetColumnNull(ColumnNames.BirthDate)
			Else
				Me.BirthDate = MyBase.SetDateTimeAsString(ColumnNames.BirthDate, Value)
			End If
		End Set
	End Property

	Public Overridable Property s_HireDate() As String
		Get
			If Me.IsColumnNull(ColumnNames.HireDate) Then
				Return String.Empty
			Else
				Return MyBase.GetDateTimeAsString(ColumnNames.HireDate)
			End If
		End Get
		Set(ByVal Value As String)
			If String.Empty = value Then
				Me.SetColumnNull(ColumnNames.HireDate)
			Else
				Me.HireDate = MyBase.SetDateTimeAsString(ColumnNames.HireDate, Value)
			End If
		End Set
	End Property

	Public Overridable Property s_Address() As String
		Get
			If Me.IsColumnNull(ColumnNames.Address) Then
				Return String.Empty
			Else
				Return MyBase.GetStringAsString(ColumnNames.Address)
			End If
		End Get
		Set(ByVal Value As String)
			If String.Empty = value Then
				Me.SetColumnNull(ColumnNames.Address)
			Else
				Me.Address = MyBase.SetStringAsString(ColumnNames.Address, Value)
			End If
		End Set
	End Property

	Public Overridable Property s_City() As String
		Get
			If Me.IsColumnNull(ColumnNames.City) Then
				Return String.Empty
			Else
				Return MyBase.GetStringAsString(ColumnNames.City)
			End If
		End Get
		Set(ByVal Value As String)
			If String.Empty = value Then
				Me.SetColumnNull(ColumnNames.City)
			Else
				Me.City = MyBase.SetStringAsString(ColumnNames.City, Value)
			End If
		End Set
	End Property

	Public Overridable Property s_Region() As String
		Get
			If Me.IsColumnNull(ColumnNames.Region) Then
				Return String.Empty
			Else
				Return MyBase.GetStringAsString(ColumnNames.Region)
			End If
		End Get
		Set(ByVal Value As String)
			If String.Empty = value Then
				Me.SetColumnNull(ColumnNames.Region)
			Else
				Me.Region = MyBase.SetStringAsString(ColumnNames.Region, Value)
			End If
		End Set
	End Property

	Public Overridable Property s_PostalCode() As String
		Get
			If Me.IsColumnNull(ColumnNames.PostalCode) Then
				Return String.Empty
			Else
				Return MyBase.GetStringAsString(ColumnNames.PostalCode)
			End If
		End Get
		Set(ByVal Value As String)
			If String.Empty = value Then
				Me.SetColumnNull(ColumnNames.PostalCode)
			Else
				Me.PostalCode = MyBase.SetStringAsString(ColumnNames.PostalCode, Value)
			End If
		End Set
	End Property

	Public Overridable Property s_Country() As String
		Get
			If Me.IsColumnNull(ColumnNames.Country) Then
				Return String.Empty
			Else
				Return MyBase.GetStringAsString(ColumnNames.Country)
			End If
		End Get
		Set(ByVal Value As String)
			If String.Empty = value Then
				Me.SetColumnNull(ColumnNames.Country)
			Else
				Me.Country = MyBase.SetStringAsString(ColumnNames.Country, Value)
			End If
		End Set
	End Property

	Public Overridable Property s_HomePhone() As String
		Get
			If Me.IsColumnNull(ColumnNames.HomePhone) Then
				Return String.Empty
			Else
				Return MyBase.GetStringAsString(ColumnNames.HomePhone)
			End If
		End Get
		Set(ByVal Value As String)
			If String.Empty = value Then
				Me.SetColumnNull(ColumnNames.HomePhone)
			Else
				Me.HomePhone = MyBase.SetStringAsString(ColumnNames.HomePhone, Value)
			End If
		End Set
	End Property

	Public Overridable Property s_Extension() As String
		Get
			If Me.IsColumnNull(ColumnNames.Extension) Then
				Return String.Empty
			Else
				Return MyBase.GetStringAsString(ColumnNames.Extension)
			End If
		End Get
		Set(ByVal Value As String)
			If String.Empty = value Then
				Me.SetColumnNull(ColumnNames.Extension)
			Else
				Me.Extension = MyBase.SetStringAsString(ColumnNames.Extension, Value)
			End If
		End Set
	End Property

	Public Overridable Property s_Notes() As String
		Get
			If Me.IsColumnNull(ColumnNames.Notes) Then
				Return String.Empty
			Else
				Return MyBase.GetStringAsString(ColumnNames.Notes)
			End If
		End Get
		Set(ByVal Value As String)
			If String.Empty = value Then
				Me.SetColumnNull(ColumnNames.Notes)
			Else
				Me.Notes = MyBase.SetStringAsString(ColumnNames.Notes, Value)
			End If
		End Set
	End Property

	Public Overridable Property s_ReportsTo() As String
		Get
			If Me.IsColumnNull(ColumnNames.ReportsTo) Then
				Return String.Empty
			Else
				Return MyBase.GetIntegerAsString(ColumnNames.ReportsTo)
			End If
		End Get
		Set(ByVal Value As String)
			If String.Empty = value Then
				Me.SetColumnNull(ColumnNames.ReportsTo)
			Else
				Me.ReportsTo = MyBase.SetIntegerAsString(ColumnNames.ReportsTo, Value)
			End If
		End Set
	End Property

	Public Overridable Property s_PhotoPath() As String
		Get
			If Me.IsColumnNull(ColumnNames.PhotoPath) Then
				Return String.Empty
			Else
				Return MyBase.GetStringAsString(ColumnNames.PhotoPath)
			End If
		End Get
		Set(ByVal Value As String)
			If String.Empty = value Then
				Me.SetColumnNull(ColumnNames.PhotoPath)
			Else
				Me.PhotoPath = MyBase.SetStringAsString(ColumnNames.PhotoPath, Value)
			End If
		End Set
	End Property

#End Region

#Region "Where Clause"
	Public Class WhereClause

		Public Sub New(ByVal entity As BusinessEntity)
			Me._entity = entity
		End Sub

		Public ReadOnly Property TearOff() As TearOffWhereParameter
			Get
				If _tearOff Is Nothing Then
					_tearOff = New TearOffWhereParameter(Me)
				End If

				Return _tearOff
			End Get
		End Property

#Region "TearOff's"
		Public Class TearOffWhereParameter

			Public Sub New(ByVal clause As WhereClause)
				Me._clause = clause
			End Sub

			Public ReadOnly Property EmployeeID() As WhereParameter
				Get
					Dim where As WhereParameter = New WhereParameter(ColumnNames.EmployeeID, Parameters.EmployeeID)
					Me._clause._entity.Query.AddWhereParemeter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property LastName() As WhereParameter
				Get
					Dim where As WhereParameter = New WhereParameter(ColumnNames.LastName, Parameters.LastName)
					Me._clause._entity.Query.AddWhereParemeter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property FirstName() As WhereParameter
				Get
					Dim where As WhereParameter = New WhereParameter(ColumnNames.FirstName, Parameters.FirstName)
					Me._clause._entity.Query.AddWhereParemeter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property Title() As WhereParameter
				Get
					Dim where As WhereParameter = New WhereParameter(ColumnNames.Title, Parameters.Title)
					Me._clause._entity.Query.AddWhereParemeter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property TitleOfCourtesy() As WhereParameter
				Get
					Dim where As WhereParameter = New WhereParameter(ColumnNames.TitleOfCourtesy, Parameters.TitleOfCourtesy)
					Me._clause._entity.Query.AddWhereParemeter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property BirthDate() As WhereParameter
				Get
					Dim where As WhereParameter = New WhereParameter(ColumnNames.BirthDate, Parameters.BirthDate)
					Me._clause._entity.Query.AddWhereParemeter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property HireDate() As WhereParameter
				Get
					Dim where As WhereParameter = New WhereParameter(ColumnNames.HireDate, Parameters.HireDate)
					Me._clause._entity.Query.AddWhereParemeter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property Address() As WhereParameter
				Get
					Dim where As WhereParameter = New WhereParameter(ColumnNames.Address, Parameters.Address)
					Me._clause._entity.Query.AddWhereParemeter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property City() As WhereParameter
				Get
					Dim where As WhereParameter = New WhereParameter(ColumnNames.City, Parameters.City)
					Me._clause._entity.Query.AddWhereParemeter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property Region() As WhereParameter
				Get
					Dim where As WhereParameter = New WhereParameter(ColumnNames.Region, Parameters.Region)
					Me._clause._entity.Query.AddWhereParemeter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property PostalCode() As WhereParameter
				Get
					Dim where As WhereParameter = New WhereParameter(ColumnNames.PostalCode, Parameters.PostalCode)
					Me._clause._entity.Query.AddWhereParemeter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property Country() As WhereParameter
				Get
					Dim where As WhereParameter = New WhereParameter(ColumnNames.Country, Parameters.Country)
					Me._clause._entity.Query.AddWhereParemeter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property HomePhone() As WhereParameter
				Get
					Dim where As WhereParameter = New WhereParameter(ColumnNames.HomePhone, Parameters.HomePhone)
					Me._clause._entity.Query.AddWhereParemeter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property Extension() As WhereParameter
				Get
					Dim where As WhereParameter = New WhereParameter(ColumnNames.Extension, Parameters.Extension)
					Me._clause._entity.Query.AddWhereParemeter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property Photo() As WhereParameter
				Get
					Dim where As WhereParameter = New WhereParameter(ColumnNames.Photo, Parameters.Photo)
					Me._clause._entity.Query.AddWhereParemeter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property Notes() As WhereParameter
				Get
					Dim where As WhereParameter = New WhereParameter(ColumnNames.Notes, Parameters.Notes)
					Me._clause._entity.Query.AddWhereParemeter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property ReportsTo() As WhereParameter
				Get
					Dim where As WhereParameter = New WhereParameter(ColumnNames.ReportsTo, Parameters.ReportsTo)
					Me._clause._entity.Query.AddWhereParemeter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property PhotoPath() As WhereParameter
				Get
					Dim where As WhereParameter = New WhereParameter(ColumnNames.PhotoPath, Parameters.PhotoPath)
					Me._clause._entity.Query.AddWhereParemeter(where)
					Return where
				End Get
			End Property

			Private _clause As WhereClause
		End Class
#End Region

		Public ReadOnly Property EmployeeID() As WhereParameter
			Get
				If _EmployeeID_W Is Nothing Then
					_EmployeeID_W = TearOff.EmployeeID
				End If
				Return _EmployeeID_W
			End Get
		End Property

		Public ReadOnly Property LastName() As WhereParameter
			Get
				If _LastName_W Is Nothing Then
					_LastName_W = TearOff.LastName
				End If
				Return _LastName_W
			End Get
		End Property

		Public ReadOnly Property FirstName() As WhereParameter
			Get
				If _FirstName_W Is Nothing Then
					_FirstName_W = TearOff.FirstName
				End If
				Return _FirstName_W
			End Get
		End Property

		Public ReadOnly Property Title() As WhereParameter
			Get
				If _Title_W Is Nothing Then
					_Title_W = TearOff.Title
				End If
				Return _Title_W
			End Get
		End Property

		Public ReadOnly Property TitleOfCourtesy() As WhereParameter
			Get
				If _TitleOfCourtesy_W Is Nothing Then
					_TitleOfCourtesy_W = TearOff.TitleOfCourtesy
				End If
				Return _TitleOfCourtesy_W
			End Get
		End Property

		Public ReadOnly Property BirthDate() As WhereParameter
			Get
				If _BirthDate_W Is Nothing Then
					_BirthDate_W = TearOff.BirthDate
				End If
				Return _BirthDate_W
			End Get
		End Property

		Public ReadOnly Property HireDate() As WhereParameter
			Get
				If _HireDate_W Is Nothing Then
					_HireDate_W = TearOff.HireDate
				End If
				Return _HireDate_W
			End Get
		End Property

		Public ReadOnly Property Address() As WhereParameter
			Get
				If _Address_W Is Nothing Then
					_Address_W = TearOff.Address
				End If
				Return _Address_W
			End Get
		End Property

		Public ReadOnly Property City() As WhereParameter
			Get
				If _City_W Is Nothing Then
					_City_W = TearOff.City
				End If
				Return _City_W
			End Get
		End Property

		Public ReadOnly Property Region() As WhereParameter
			Get
				If _Region_W Is Nothing Then
					_Region_W = TearOff.Region
				End If
				Return _Region_W
			End Get
		End Property

		Public ReadOnly Property PostalCode() As WhereParameter
			Get
				If _PostalCode_W Is Nothing Then
					_PostalCode_W = TearOff.PostalCode
				End If
				Return _PostalCode_W
			End Get
		End Property

		Public ReadOnly Property Country() As WhereParameter
			Get
				If _Country_W Is Nothing Then
					_Country_W = TearOff.Country
				End If
				Return _Country_W
			End Get
		End Property

		Public ReadOnly Property HomePhone() As WhereParameter
			Get
				If _HomePhone_W Is Nothing Then
					_HomePhone_W = TearOff.HomePhone
				End If
				Return _HomePhone_W
			End Get
		End Property

		Public ReadOnly Property Extension() As WhereParameter
			Get
				If _Extension_W Is Nothing Then
					_Extension_W = TearOff.Extension
				End If
				Return _Extension_W
			End Get
		End Property

		Public ReadOnly Property Photo() As WhereParameter
			Get
				If _Photo_W Is Nothing Then
					_Photo_W = TearOff.Photo
				End If
				Return _Photo_W
			End Get
		End Property

		Public ReadOnly Property Notes() As WhereParameter
			Get
				If _Notes_W Is Nothing Then
					_Notes_W = TearOff.Notes
				End If
				Return _Notes_W
			End Get
		End Property

		Public ReadOnly Property ReportsTo() As WhereParameter
			Get
				If _ReportsTo_W Is Nothing Then
					_ReportsTo_W = TearOff.ReportsTo
				End If
				Return _ReportsTo_W
			End Get
		End Property

		Public ReadOnly Property PhotoPath() As WhereParameter
			Get
				If _PhotoPath_W Is Nothing Then
					_PhotoPath_W = TearOff.PhotoPath
				End If
				Return _PhotoPath_W
			End Get
		End Property

		Private _EmployeeID_W As WhereParameter = Nothing
		Private _LastName_W As WhereParameter = Nothing
		Private _FirstName_W As WhereParameter = Nothing
		Private _Title_W As WhereParameter = Nothing
		Private _TitleOfCourtesy_W As WhereParameter = Nothing
		Private _BirthDate_W As WhereParameter = Nothing
		Private _HireDate_W As WhereParameter = Nothing
		Private _Address_W As WhereParameter = Nothing
		Private _City_W As WhereParameter = Nothing
		Private _Region_W As WhereParameter = Nothing
		Private _PostalCode_W As WhereParameter = Nothing
		Private _Country_W As WhereParameter = Nothing
		Private _HomePhone_W As WhereParameter = Nothing
		Private _Extension_W As WhereParameter = Nothing
		Private _Photo_W As WhereParameter = Nothing
		Private _Notes_W As WhereParameter = Nothing
		Private _ReportsTo_W As WhereParameter = Nothing
		Private _PhotoPath_W As WhereParameter = Nothing

		Public Sub WhereClauseReset()

			_EmployeeID_W = Nothing
			_LastName_W = Nothing
			_FirstName_W = Nothing
			_Title_W = Nothing
			_TitleOfCourtesy_W = Nothing
			_BirthDate_W = Nothing
			_HireDate_W = Nothing
			_Address_W = Nothing
			_City_W = Nothing
			_Region_W = Nothing
			_PostalCode_W = Nothing
			_Country_W = Nothing
			_HomePhone_W = Nothing
			_Extension_W = Nothing
			_Photo_W = Nothing
			_Notes_W = Nothing
			_ReportsTo_W = Nothing
			_PhotoPath_W = Nothing
			Me._entity.Query.FlushWhereParameters()

		End Sub

		Private _entity As BusinessEntity
		Private _tearOff As TearOffWhereParameter
	End Class

	Public ReadOnly Property Where() As WhereClause
		Get
			If _whereClause Is Nothing Then
				_whereClause = New WhereClause(Me)
			End If

			Return _whereClause
		End Get
	End Property

	Private _whereClause As WhereClause = Nothing
#End Region

#Region "Aggregate Clause"
	Public Class AggregateClause

		Public Sub New(ByVal entity As BusinessEntity)
			Me._entity = entity
		End Sub

		Public ReadOnly Property TearOff() As TearOffAggregateParameter
			Get
				If _tearOff Is Nothing Then
					_tearOff = New TearOffAggregateParameter(Me)
				End If

				Return _tearOff
			End Get
		End Property

#Region "AggregateParameter TearOff's"
		Public Class TearOffAggregateParameter

			Public Sub New(ByVal clause As AggregateClause)
				Me._clause = clause
			End Sub

			Public ReadOnly Property EmployeeID() As AggregateParameter
				Get
					Dim where As AggregateParameter = New AggregateParameter(ColumnNames.EmployeeID, Parameters.EmployeeID)
					Me._clause._entity.Query.AddAggregateParameter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property LastName() As AggregateParameter
				Get
					Dim where As AggregateParameter = New AggregateParameter(ColumnNames.LastName, Parameters.LastName)
					Me._clause._entity.Query.AddAggregateParameter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property FirstName() As AggregateParameter
				Get
					Dim where As AggregateParameter = New AggregateParameter(ColumnNames.FirstName, Parameters.FirstName)
					Me._clause._entity.Query.AddAggregateParameter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property Title() As AggregateParameter
				Get
					Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Title, Parameters.Title)
					Me._clause._entity.Query.AddAggregateParameter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property TitleOfCourtesy() As AggregateParameter
				Get
					Dim where As AggregateParameter = New AggregateParameter(ColumnNames.TitleOfCourtesy, Parameters.TitleOfCourtesy)
					Me._clause._entity.Query.AddAggregateParameter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property BirthDate() As AggregateParameter
				Get
					Dim where As AggregateParameter = New AggregateParameter(ColumnNames.BirthDate, Parameters.BirthDate)
					Me._clause._entity.Query.AddAggregateParameter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property HireDate() As AggregateParameter
				Get
					Dim where As AggregateParameter = New AggregateParameter(ColumnNames.HireDate, Parameters.HireDate)
					Me._clause._entity.Query.AddAggregateParameter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property Address() As AggregateParameter
				Get
					Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Address, Parameters.Address)
					Me._clause._entity.Query.AddAggregateParameter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property City() As AggregateParameter
				Get
					Dim where As AggregateParameter = New AggregateParameter(ColumnNames.City, Parameters.City)
					Me._clause._entity.Query.AddAggregateParameter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property Region() As AggregateParameter
				Get
					Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Region, Parameters.Region)
					Me._clause._entity.Query.AddAggregateParameter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property PostalCode() As AggregateParameter
				Get
					Dim where As AggregateParameter = New AggregateParameter(ColumnNames.PostalCode, Parameters.PostalCode)
					Me._clause._entity.Query.AddAggregateParameter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property Country() As AggregateParameter
				Get
					Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Country, Parameters.Country)
					Me._clause._entity.Query.AddAggregateParameter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property HomePhone() As AggregateParameter
				Get
					Dim where As AggregateParameter = New AggregateParameter(ColumnNames.HomePhone, Parameters.HomePhone)
					Me._clause._entity.Query.AddAggregateParameter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property Extension() As AggregateParameter
				Get
					Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Extension, Parameters.Extension)
					Me._clause._entity.Query.AddAggregateParameter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property Photo() As AggregateParameter
				Get
					Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Photo, Parameters.Photo)
					Me._clause._entity.Query.AddAggregateParameter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property Notes() As AggregateParameter
				Get
					Dim where As AggregateParameter = New AggregateParameter(ColumnNames.Notes, Parameters.Notes)
					Me._clause._entity.Query.AddAggregateParameter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property ReportsTo() As AggregateParameter
				Get
					Dim where As AggregateParameter = New AggregateParameter(ColumnNames.ReportsTo, Parameters.ReportsTo)
					Me._clause._entity.Query.AddAggregateParameter(where)
					Return where
				End Get
			End Property

			Public ReadOnly Property PhotoPath() As AggregateParameter
				Get
					Dim where As AggregateParameter = New AggregateParameter(ColumnNames.PhotoPath, Parameters.PhotoPath)
					Me._clause._entity.Query.AddAggregateParameter(where)
					Return where
				End Get
			End Property

			Private _clause As AggregateClause
		End Class
#End Region

		Public ReadOnly Property EmployeeID() As AggregateParameter
			Get
				If _EmployeeID_W Is Nothing Then
					_EmployeeID_W = TearOff.EmployeeID
				End If
				Return _EmployeeID_W
			End Get
		End Property

		Public ReadOnly Property LastName() As AggregateParameter
			Get
				If _LastName_W Is Nothing Then
					_LastName_W = TearOff.LastName
				End If
				Return _LastName_W
			End Get
		End Property

		Public ReadOnly Property FirstName() As AggregateParameter
			Get
				If _FirstName_W Is Nothing Then
					_FirstName_W = TearOff.FirstName
				End If
				Return _FirstName_W
			End Get
		End Property

		Public ReadOnly Property Title() As AggregateParameter
			Get
				If _Title_W Is Nothing Then
					_Title_W = TearOff.Title
				End If
				Return _Title_W
			End Get
		End Property

		Public ReadOnly Property TitleOfCourtesy() As AggregateParameter
			Get
				If _TitleOfCourtesy_W Is Nothing Then
					_TitleOfCourtesy_W = TearOff.TitleOfCourtesy
				End If
				Return _TitleOfCourtesy_W
			End Get
		End Property

		Public ReadOnly Property BirthDate() As AggregateParameter
			Get
				If _BirthDate_W Is Nothing Then
					_BirthDate_W = TearOff.BirthDate
				End If
				Return _BirthDate_W
			End Get
		End Property

		Public ReadOnly Property HireDate() As AggregateParameter
			Get
				If _HireDate_W Is Nothing Then
					_HireDate_W = TearOff.HireDate
				End If
				Return _HireDate_W
			End Get
		End Property

		Public ReadOnly Property Address() As AggregateParameter
			Get
				If _Address_W Is Nothing Then
					_Address_W = TearOff.Address
				End If
				Return _Address_W
			End Get
		End Property

		Public ReadOnly Property City() As AggregateParameter
			Get
				If _City_W Is Nothing Then
					_City_W = TearOff.City
				End If
				Return _City_W
			End Get
		End Property

		Public ReadOnly Property Region() As AggregateParameter
			Get
				If _Region_W Is Nothing Then
					_Region_W = TearOff.Region
				End If
				Return _Region_W
			End Get
		End Property

		Public ReadOnly Property PostalCode() As AggregateParameter
			Get
				If _PostalCode_W Is Nothing Then
					_PostalCode_W = TearOff.PostalCode
				End If
				Return _PostalCode_W
			End Get
		End Property

		Public ReadOnly Property Country() As AggregateParameter
			Get
				If _Country_W Is Nothing Then
					_Country_W = TearOff.Country
				End If
				Return _Country_W
			End Get
		End Property

		Public ReadOnly Property HomePhone() As AggregateParameter
			Get
				If _HomePhone_W Is Nothing Then
					_HomePhone_W = TearOff.HomePhone
				End If
				Return _HomePhone_W
			End Get
		End Property

		Public ReadOnly Property Extension() As AggregateParameter
			Get
				If _Extension_W Is Nothing Then
					_Extension_W = TearOff.Extension
				End If
				Return _Extension_W
			End Get
		End Property

		Public ReadOnly Property Photo() As AggregateParameter
			Get
				If _Photo_W Is Nothing Then
					_Photo_W = TearOff.Photo
				End If
				Return _Photo_W
			End Get
		End Property

		Public ReadOnly Property Notes() As AggregateParameter
			Get
				If _Notes_W Is Nothing Then
					_Notes_W = TearOff.Notes
				End If
				Return _Notes_W
			End Get
		End Property

		Public ReadOnly Property ReportsTo() As AggregateParameter
			Get
				If _ReportsTo_W Is Nothing Then
					_ReportsTo_W = TearOff.ReportsTo
				End If
				Return _ReportsTo_W
			End Get
		End Property

		Public ReadOnly Property PhotoPath() As AggregateParameter
			Get
				If _PhotoPath_W Is Nothing Then
					_PhotoPath_W = TearOff.PhotoPath
				End If
				Return _PhotoPath_W
			End Get
		End Property

		Private _EmployeeID_W As AggregateParameter = Nothing
		Private _LastName_W As AggregateParameter = Nothing
		Private _FirstName_W As AggregateParameter = Nothing
		Private _Title_W As AggregateParameter = Nothing
		Private _TitleOfCourtesy_W As AggregateParameter = Nothing
		Private _BirthDate_W As AggregateParameter = Nothing
		Private _HireDate_W As AggregateParameter = Nothing
		Private _Address_W As AggregateParameter = Nothing
		Private _City_W As AggregateParameter = Nothing
		Private _Region_W As AggregateParameter = Nothing
		Private _PostalCode_W As AggregateParameter = Nothing
		Private _Country_W As AggregateParameter = Nothing
		Private _HomePhone_W As AggregateParameter = Nothing
		Private _Extension_W As AggregateParameter = Nothing
		Private _Photo_W As AggregateParameter = Nothing
		Private _Notes_W As AggregateParameter = Nothing
		Private _ReportsTo_W As AggregateParameter = Nothing
		Private _PhotoPath_W As AggregateParameter = Nothing

		Public Sub AggregateClauseReset()

			_EmployeeID_W = Nothing
			_LastName_W = Nothing
			_FirstName_W = Nothing
			_Title_W = Nothing
			_TitleOfCourtesy_W = Nothing
			_BirthDate_W = Nothing
			_HireDate_W = Nothing
			_Address_W = Nothing
			_City_W = Nothing
			_Region_W = Nothing
			_PostalCode_W = Nothing
			_Country_W = Nothing
			_HomePhone_W = Nothing
			_Extension_W = Nothing
			_Photo_W = Nothing
			_Notes_W = Nothing
			_ReportsTo_W = Nothing
			_PhotoPath_W = Nothing
			Me._entity.Query.FlushAggregateParameters()

		End Sub

		Private _entity As BusinessEntity
		Private _tearOff As TearOffAggregateParameter
	End Class

	Public ReadOnly Property Aggregate() As AggregateClause
		Get
			If _aggregateClause Is Nothing Then
				_aggregateClause = New AggregateClause(Me)
			End If

			Return _aggregateClause
		End Get
	End Property

	Private _aggregateClause As AggregateClause = Nothing
#End Region

	Protected Overrides Function GetInsertCommand() As IDbCommand

		Dim cmd As SqlCommand = New SqlCommand
		cmd.CommandType = CommandType.StoredProcedure
		cmd.CommandText = "[" + Me.SchemaStoredProcedure + "proc_EmployeesInsert]"

		CreateParameters(cmd)

		Dim p As SqlParameter
		p = cmd.Parameters(Parameters.EmployeeID.ParameterName)
		p.Direction = ParameterDirection.Output

		Return cmd

	End Function

	Protected Overrides Function GetUpdateCommand() As IDbCommand

		Dim cmd As SqlCommand = New SqlCommand
		cmd.CommandType = CommandType.StoredProcedure
		cmd.CommandText = "[" + Me.SchemaStoredProcedure + "proc_EmployeesUpdate]"

		CreateParameters(cmd)

		Return cmd

	End Function

	Protected Overrides Function GetDeleteCommand() As IDbCommand

		Dim cmd As SqlCommand = New SqlCommand
		cmd.CommandType = CommandType.StoredProcedure
		cmd.CommandText = "[" + Me.SchemaStoredProcedure + "proc_EmployeesDelete]"

		Dim p As SqlParameter
		p = cmd.Parameters.Add(Parameters.EmployeeID)
		p.SourceColumn = ColumnNames.EmployeeID
		p.SourceVersion = DataRowVersion.Current

		Return cmd

	End Function

	Private Sub CreateParameters(ByVal cmd As SqlCommand)

		Dim p As SqlParameter
		p = cmd.Parameters.Add(Parameters.EmployeeID)
		p.SourceColumn = ColumnNames.EmployeeID
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.LastName)
		p.SourceColumn = ColumnNames.LastName
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.FirstName)
		p.SourceColumn = ColumnNames.FirstName
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.Title)
		p.SourceColumn = ColumnNames.Title
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.TitleOfCourtesy)
		p.SourceColumn = ColumnNames.TitleOfCourtesy
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.BirthDate)
		p.SourceColumn = ColumnNames.BirthDate
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.HireDate)
		p.SourceColumn = ColumnNames.HireDate
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.Address)
		p.SourceColumn = ColumnNames.Address
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.City)
		p.SourceColumn = ColumnNames.City
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.Region)
		p.SourceColumn = ColumnNames.Region
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.PostalCode)
		p.SourceColumn = ColumnNames.PostalCode
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.Country)
		p.SourceColumn = ColumnNames.Country
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.HomePhone)
		p.SourceColumn = ColumnNames.HomePhone
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.Extension)
		p.SourceColumn = ColumnNames.Extension
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.Photo)
		p.SourceColumn = ColumnNames.Photo
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.Notes)
		p.SourceColumn = ColumnNames.Notes
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.ReportsTo)
		p.SourceColumn = ColumnNames.ReportsTo
		p.SourceVersion = DataRowVersion.Current

		p = cmd.Parameters.Add(Parameters.PhotoPath)
		p.SourceColumn = ColumnNames.PhotoPath
		p.SourceVersion = DataRowVersion.Current

	End Sub

End Class


text:
CREATE TYPE workday AS ENUM('monday', 'tuesday', 'wednesday', 'thursday', 'friday');
CREATE TYPE faceyface AS ENUM('angry', 'hungry', 'bitter');

CREATE TABLE event_one (
  id     serial PRIMARY KEY NOT NULL,
  name   VARCHAR(255),
  day    workday NOT NULL
);

CREATE TABLE event_two (
  id     serial PRIMARY KEY NOT NULL,
  name   VARCHAR(255),
  day    workday NOT NULL
);

CREATE TABLE event_three (
  id     serial PRIMARY KEY NOT NULL,
  name   VARCHAR(255),
  day    workday NOT NULL,
  face   faceyface NOT NULL,
  thing  workday NULL,
  stuff  faceyface NULL
);

CREATE TABLE facey (
  id serial PRIMARY KEY NOT NULL,
  name VARCHAR(255),
  face faceyface NOT NULL
);

CREATE TABLE magic (
  id       serial PRIMARY KEY NOT NULL,
  id_two   serial NOT NULL,
  id_three serial,

  bool_zero   bool,
  bool_one    bool NULL,
  bool_two    bool NOT NULL,
  bool_three  bool NULL DEFAULT FALSE,
  bool_four   bool NULL DEFAULT TRUE,
  bool_five   bool NOT NULL DEFAULT FALSE,
  bool_six    bool NOT NULL DEFAULT TRUE,

  string_zero   VARCHAR(1),
  string_one    VARCHAR(1) NULL,
  string_two    VARCHAR(1) NOT NULL,
  string_three  VARCHAR(1) NULL DEFAULT 'a',
  string_four   VARCHAR(1) NOT NULL DEFAULT 'b',
  string_five   VARCHAR(1000),
  string_six    VARCHAR(1000) NULL,
  string_seven  VARCHAR(1000) NOT NULL,
  string_eight  VARCHAR(1000) NULL DEFAULT 'abcdefgh',
  string_nine   VARCHAR(1000) NOT NULL DEFAULT 'abcdefgh',
  string_ten    VARCHAR(1000) NULL DEFAULT '',
  string_eleven VARCHAR(1000) NOT NULL DEFAULT '',

  nonbyte_zero   CHAR(1),
  nonbyte_one    CHAR(1) NULL,
  nonbyte_two    CHAR(1) NOT NULL,
  nonbyte_three  CHAR(1) NULL DEFAULT 'a',
  nonbyte_four   CHAR(1) NOT NULL DEFAULT 'b',
  nonbyte_five   CHAR(1000),
  nonbyte_six    CHAR(1000) NULL,
  nonbyte_seven  CHAR(1000) NOT NULL,
  nonbyte_eight  CHAR(1000) NULL DEFAULT 'a',
  nonbyte_nine   CHAR(1000) NOT NULL DEFAULT 'b',

  byte_zero   "char",
  byte_one    "char" NULL,
  byte_two    "char" NULL DEFAULT 'a',
  byte_three  "char" NOT NULL,
  byte_four   "char" NOT NULL DEFAULT 'b',

  big_int_zero  bigint,
  big_int_one   bigint NULL,
  big_int_two   bigint NOT NULL,
  big_int_three bigint NULL DEFAULT 111111,
  big_int_four  bigint NOT NULL DEFAULT 222222,
  big_int_five  bigint NULL DEFAULT 0,
  big_int_six   bigint NOT NULL DEFAULT 0,

  int_zero  int,
  int_one   int NULL,
  int_two   int NOT NULL,
  int_three int NULL DEFAULT 333333,
  int_four  int NOT NULL DEFAULT 444444,
  int_five  int NULL DEFAULT 0,
  int_six   int NOT NULL DEFAULT 0,

  float_zero  decimal,
  float_one   numeric,
  float_two   numeric(2,1),
  float_three numeric(2,1),
  float_four  numeric(2,1) NULL,
  float_five  numeric(2,1) NOT NULL,
  float_six   numeric(2,1) NULL DEFAULT 1.1,
  float_seven numeric(2,1) NOT NULL DEFAULT 1.1,
  float_eight numeric(2,1) NULL DEFAULT 0.0,
  float_nine  numeric(2,1) NULL DEFAULT 0.0,

  bytea_zero  bytea,
  bytea_one   bytea NULL,
  bytea_two   bytea NOT NULL,
  bytea_three bytea NOT NULL DEFAULT 'a',
  bytea_four  bytea NULL DEFAULT 'b',
  bytea_five  bytea NOT NULL DEFAULT 'abcdefghabcdefghabcdefgh',
  bytea_six   bytea NULL DEFAULT 'hgfedcbahgfedcbahgfedcba',
  bytea_seven bytea NOT NULL DEFAULT '',
  bytea_eight bytea NOT NULL DEFAULT '',

  time_zero      timestamp,
  time_one       date,
  time_two       timestamp NULL DEFAULT NULL,
  time_three     timestamp NULL,
  time_four      timestamp NOT NULL,
  time_five      timestamp NULL DEFAULT '1999-01-08 04:05:06.789',
  time_six       timestamp NULL DEFAULT '1999-01-08 04:05:06.789 -8:00',
  time_seven     timestamp NULL DEFAULT 'January 8 04:05:06 1999 PST',
  time_eight     timestamp NOT NULL DEFAULT '1999-01-08 04:05:06.789',
  time_nine      timestamp NOT NULL DEFAULT '1999-01-08 04:05:06.789 -8:00',
  time_ten       timestamp NOT NULL DEFAULT 'January 8 04:05:06 1999 PST',
  time_eleven    date NULL,
  time_twelve    date NOT NULL,
  time_thirteen  date NULL DEFAULT '1999-01-08',
  time_fourteen  date NULL DEFAULT 'January 8, 1999',
  time_fifteen   date NULL DEFAULT '19990108',
  time_sixteen   date NOT NULL DEFAULT '1999-01-08',
  time_seventeen date NOT NULL DEFAULT 'January 8, 1999',
  time_eighteen  date NOT NULL DEFAULT '19990108',

  uuid_zero  uuid,
  uuid_one   uuid NULL,
  uuid_two   uuid NULL DEFAULT NULL,
  uuid_three uuid NOT NULL,
  uuid_four  uuid NULL DEFAULT '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
  uuid_five  uuid NOT NULL DEFAULT '6ba7b810-9dad-11d1-80b4-00c04fd430c8',

  strange_one   integer DEFAULT '5'::integer,
  strange_two   varchar(1000) DEFAULT 5::varchar,
  strange_three timestamp without time zone default (now() at time zone 'utc'),
  strange_four  timestamp with time zone default (now() at time zone 'utc'),
  strange_five  interval NOT NULL DEFAULT '21 days',
  strange_six   interval NULL DEFAULT '23 hours',

  aa  json NULL,
  bb  json NOT NULL,
  cc  jsonb NULL,
  dd  jsonb NOT NULL,
  ee  box NULL,
  ff  box NOT NULL,
  gg  cidr NULL,
  hh  cidr NOT NULL,
  ii  circle NULL,
  jj  circle NOT NULL,
  kk  double precision NULL,
  ll  double precision NOT NULL,
  mm  inet NULL,
  nn  inet NOT NULL,
  oo  line NULL,
  pp  line NOT NULL,
  qq  lseg NULL,
  rr  lseg NOT NULL,
  ss  macaddr NULL,
  tt  macaddr NOT NULL,
  uu  money NULL,
  vv  money NOT NULL,
  ww  path NULL,
  xx  path NOT NULL,
  yy  pg_lsn NULL,
  zz  pg_lsn NOT NULL,
  aaa point NULL,
  bbb point NOT NULL,
  ccc polygon NULL,
  ddd polygon NOT NULL,
  eee tsquery NULL,
  fff tsquery NOT NULL,
  ggg tsvector NULL,
  hhh tsvector NOT NULL,
  iii txid_snapshot NULL,
  jjj txid_snapshot NOT NULL,
  kkk xml NULL,
  lll xml NOT NULL
);

create table owner (
  id    serial primary key not null,
  name  varchar(255) not null
);

create table cats (
  id       serial primary key not null,
  name     varchar(255) not null,
  owner_id int references owner (id)
);

create table toys (
  id    serial primary key not null,
  name  varchar(255) not null
);

create table cat_toys (
  cat_id int not null references cats (id),
  toy_id int not null references toys (id),
  primary key (cat_id, toy_id)
);

create table dog_toys (
  dog_id int not null,
  toy_id int not null,
  primary key (dog_id, toy_id)
);

create table dragon_toys (
  dragon_id uuid,
  toy_id    uuid,
  primary key (dragon_id, toy_id)
);

create table spider_toys (
  spider_id uuid,
  name      character varying,
  primary key (spider_id)
);

create table pals (
  pal character varying,
  name character varying,
  primary key (pal)
);

create table friend (
  friend character varying,
  name character varying,
  primary key (friend)
);

create table bro (
  bros character varying,
  name character varying,
  primary key (bros)
);

create table enemies (
  enemies character varying,
  name character varying,
  primary key (enemies)
);

create table chocolate (
  dog varchar(100) primary key
);

create table waffles (
  cat varchar(100) primary key
);

create table fun_arrays (
  id serial,
  fun_one integer[] null,
  fun_two integer[] not null,
  fun_three boolean[] null,
  fun_four boolean[] not null,
  fun_five varchar[] null,
  fun_six varchar[] not null,
  fun_seven decimal[] null,
  fun_eight decimal[] not null,
  fun_nine bytea[] null,
  fun_ten bytea[] not null,
  fun_eleven jsonb[] null,
  fun_twelve jsonb[] not null,
  fun_thirteen json[] null,
  fun_fourteen json[] not null,
  primary key (id)
);

create table tigers (
  id    bytea primary key,
  name  bytea null
);

create table elephants (
  id        bytea primary key,
  name      bytea not null,
  tiger_id  bytea null unique,
  foreign key (tiger_id) references tigers (id)
);

create table wolves (
  id        bytea primary key,
  name      bytea not null,
  tiger_id  bytea not null unique,
  foreign key (tiger_id) references tigers (id)
);

create table ants (
  id        bytea primary key,
  name      bytea not null,
  tiger_id  bytea not null,
  foreign key (tiger_id) references tigers (id)
);

create table worms (
  id        bytea primary key,
  name      bytea not null,
  tiger_id  bytea null,
  foreign key (tiger_id) references tigers (id)
);

create table addresses (
  id bytea primary key,
  name bytea null
);

create table houses (
  id bytea primary key,
  name bytea not null,
  address_id bytea not null unique,
  foreign key (address_id) references addresses (id)
);

create table byte_pilots (
  id   bytea primary key not null,
  name character varying
);

create table byte_airports (
  id   bytea primary key not null,
  name character varying
);

create table byte_languages (
  id   bytea primary key not null,
  name character varying
);

create table byte_jets (
  id              bytea primary key not null,
  name            character varying,
  byte_pilot_id   bytea unique,
  byte_airport_id bytea,

  foreign key (byte_pilot_id) references byte_pilots (id),
  foreign key (byte_airport_id) references byte_airports (id)
);

create table byte_pilot_languages (
  byte_pilot_id    bytea not null,
  byte_language_id bytea not null,

  primary key (byte_pilot_id, byte_language_id),
  foreign key (byte_pilot_id) references byte_pilots (id),
  foreign key (byte_language_id) references byte_languages (id)
);

create table cars (
  id integer not null,
  name text,
  primary key (id)
);

create table car_cars (
  car_id integer not null,
  awesome_car_id integer not null,
  relation text not null,
  primary key (car_id, awesome_car_id),
  foreign key (car_id) references cars(id),
  foreign key (awesome_car_id) references cars(id)
);

create table trucks (
  id integer not null,
  parent_id integer,
  name text,
  primary key (id),
  foreign key (parent_id) references trucks(id)
);

CREATE TABLE race (
    id integer PRIMARY KEY NOT NULL,
    race_date timestamp,
    track text
);

CREATE TABLE race_results (
    id integer PRIMARY KEY NOT NULL,
    race_id integer,
    name text,
    foreign key (race_id) references race(id)
);

CREATE TABLE race_result_scratchings (
    id integer PRIMARY KEY NOT NULL,
    results_id integer NOT NULL,
    name text NOT NULL,
    foreign key (results_id) references race_results(id)
);

CREATE TABLE pilots (
  id integer NOT NULL,
  name text NOT NULL
);

ALTER TABLE pilots ADD CONSTRAINT pilot_pkey PRIMARY KEY (id);

CREATE TABLE jets (
  id integer NOT NULL,
  pilot_id integer NOT NULL,
  age integer NOT NULL,
  name text NOT NULL,
  color text NOT NULL
);

ALTER TABLE jets ADD CONSTRAINT jet_pkey PRIMARY KEY (id);
-- The following fkey remains poorly named to avoid regressions related to psql naming
ALTER TABLE jets ADD CONSTRAINT pilots_fkey FOREIGN KEY (pilot_id) REFERENCES pilots(id);

CREATE TABLE languages (
  id integer NOT NULL,
  language text NOT NULL
);

ALTER TABLE languages ADD CONSTRAINT language_pkey PRIMARY KEY (id);

-- Join table
CREATE TABLE pilot_languages (
  pilot_id integer NOT NULL,
  language_id integer NOT NULL
);

-- Composite primary key
ALTER TABLE pilot_languages ADD CONSTRAINT pilot_language_pkey PRIMARY KEY (pilot_id, language_id);
-- The following fkey remains poorly named to avoid regressions related to psql naming
ALTER TABLE pilot_languages ADD CONSTRAINT pilots_fkey FOREIGN KEY (pilot_id) REFERENCES pilots(id);
ALTER TABLE pilot_languages ADD CONSTRAINT languages_fkey FOREIGN KEY (language_id) REFERENCES languages(id);


text:
package com.orionplatform.math.number.tasks.check;

import java.math.BigDecimal;
import java.math.BigInteger;
import com.orionplatform.core.abstraction.Orion;
import com.orionplatform.math.number.Numbers;

public class IsNumberLessThanOneTask extends Orion
{
    public static synchronized boolean run(Number x)
    {
        if(Numbers.isBigInteger(x))
        {
            return ((BigInteger)x).compareTo(BigInteger.ONE) < 0;
        }
        else if(Numbers.isBigDecimal(x))
        {
            return ((BigDecimal)x).compareTo(BigDecimal.ONE) < 0;
        }

        return false;
    }
}


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.wpi.first.wpilibj.templates.commands;

import edu.wpi.first.wpilibj.templates.subsystems.LoaderSubsystem;

    // Called just before this Command runs the first time
    // Called repeatedly when this Command is scheduled to run
/**
 *
 * @author team4097
 */
public class Load extends CommandBase{
    private long start;
    private boolean isLoading = false;
    public Load() {
       this.requires(load);
    }

        // Use requires() here to declare subsystem dependencies
        // eg. requires(chassis);

    protected void initialize() {
        isLoading = true;
        start = System.currentTimeMillis();
    }

    protected void execute() {
         if(oi.overrideMode){
             if(isLoading){
            load.loadSpeed(.2);
        }
        if(System.currentTimeMillis() - start > 540){
                isLoading = false;
        }
        }
    }

    protected boolean isFinished() {
        return !isLoading;
    }

    protected void end() {
        load.loadSpeed(0);
        isLoading = false;
    }

    protected void interrupted() {
        load.loadSpeed(0);
        isLoading = false;
    }

    }

    // Make this return true when this Command no longer needs to run execute()

    // Called once after isFinished returns true

    // Called when another command which requires one or more of the same
    // subsystems is scheduled to run