' This class is "generated" and will be overwritten.
' Your customizations should be made in ShippersRecord.vb

Imports System.Data.SqlTypes
Imports BaseClasses
Imports BaseClasses.Data
Imports BaseClasses.Data.SqlProvider

Namespace AuditTrail.Business

''' <summary>
''' The generated superclass for the <see cref="ShippersRecord"></see> class.
''' </summary>
''' <remarks>
''' This class is not intended to be instantiated directly.  To obtain an instance of this class, 
''' use the methods of the <see cref="ShippersTable"></see> class.
''' </remarks>
''' <seealso cref="ShippersTable"></seealso>
''' <seealso cref="ShippersRecord"></seealso>

<Serializable()> Public Class BaseShippersRecord
	Inherits PrimaryKeyRecord
	

	Public Shared Shadows ReadOnly TableUtils As ShippersTable = ShippersTable.Instance

	' Constructors
 
	Protected Sub New()
		MyBase.New(TableUtils)
	End Sub

	Protected Sub New(ByVal record As PrimaryKeyRecord)
		MyBase.New(record, TableUtils)
	End Sub







#Region "Convenience methods to get/set values of fields"

	''' <summary>
	''' This is a convenience method that provides direct access to the value of the record's Shippers_.ShipperID field.
	''' </summary>
	Public Function GetShipperIDValue() As ColumnValue
		Return Me.GetValue(TableUtils.ShipperIDColumn)
	End Function

	''' <summary>
	''' This is a convenience method that provides direct access to the value of the record's Shippers_.ShipperID field.
	''' </summary>
	Public Function GetShipperIDFieldValue() As Int32
		Return CType(Me.GetValue(TableUtils.ShipperIDColumn).ToInt32(), Int32)
	End Function

	''' <summary>
	''' This is a convenience method that provides direct access to the value of the record's Shippers_.CompanyName field.
	''' </summary>
	Public Function GetCompanyNameValue() As ColumnValue
		Return Me.GetValue(TableUtils.CompanyNameColumn)
	End Function

	''' <summary>
	''' This is a convenience method that provides direct access to the value of the record's Shippers_.CompanyName field.
	''' </summary>
	Public Function GetCompanyNameFieldValue() As String
		Return CType(Me.GetValue(TableUtils.CompanyNameColumn).ToString(), String)
	End Function

	''' <summary>
	''' This is a convenience method that allows direct modification of the value of the record's Shippers_.CompanyName field.
	''' </summary>
	Public Sub SetCompanyNameFieldValue(ByVal val As ColumnValue)
		Me.SetValue(val, TableUtils.CompanyNameColumn)
	End Sub

	''' <summary>
	''' This is a convenience method that allows direct modification of the value of the record's Shippers_.CompanyName field.
	''' </summary>
	Public Sub SetCompanyNameFieldValue(ByVal val As String)
		Dim colValue As ColumnValue = New ColumnValue(val)
		Me.SetValue(colValue, TableUtils.CompanyNameColumn)
	End Sub

	''' <summary>
	''' This is a convenience method that provides direct access to the value of the record's Shippers_.Phone field.
	''' </summary>
	Public Function GetPhoneValue() As ColumnValue
		Return Me.GetValue(TableUtils.PhoneColumn)
	End Function

	''' <summary>
	''' This is a convenience method that provides direct access to the value of the record's Shippers_.Phone field.
	''' </summary>
	Public Function GetPhoneFieldValue() As String
		Return CType(Me.GetValue(TableUtils.PhoneColumn).ToString(), String)
	End Function

	''' <summary>
	''' This is a convenience method that allows direct modification of the value of the record's Shippers_.Phone field.
	''' </summary>
	Public Sub SetPhoneFieldValue(ByVal val As ColumnValue)
		Me.SetValue(val, TableUtils.PhoneColumn)
	End Sub

	''' <summary>
	''' This is a convenience method that allows direct modification of the value of the record's Shippers_.Phone field.
	''' </summary>
	Public Sub SetPhoneFieldValue(ByVal val As String)
		Dim colValue As ColumnValue = New ColumnValue(val)
		Me.SetValue(colValue, TableUtils.PhoneColumn)
	End Sub



#End Region

#Region "Convenience methods to get field names"

	''' <summary>
	''' This is a convenience property that provides direct access to the value of the record's Shippers_.ShipperID field.
	''' </summary>
	Public Property ShipperID() As Int32
		Get 
			Return CType(Me.GetValue(TableUtils.ShipperIDColumn).ToInt32(), Int32)
		End Get
		Set (ByVal val As Int32) 
			Dim colValue As ColumnValue = New ColumnValue(val)
			Me.SetValue(colValue, TableUtils.ShipperIDColumn)
		End Set
	End Property


	''' <summary>
	''' This is a convenience method that can be used to determine that the column is set.
	''' </summary>
	Public ReadOnly Property ShipperIDSpecified() As Boolean
        Get
            Dim val As ColumnValue = Me.GetValue(TableUtils.ShipperIDColumn)
            If val Is Nothing OrElse val.IsNull Then
                Return False
            End If
            Return True
        End Get
    End Property

	''' <summary>
	''' This is a convenience method that can be used to get the default value of a column.
	''' </summary>
    Public ReadOnly Property ShipperIDDefault() As String
        Get
            Return TableUtils.ShipperIDColumn.DefaultValue
        End Get
    End Property

	''' <summary>
	''' This is a convenience property that provides direct access to the value of the record's Shippers_.CompanyName field.
	''' </summary>
	Public Property CompanyName() As String
		Get 
			Return CType(Me.GetValue(TableUtils.CompanyNameColumn).ToString(), String)
		End Get
		Set (ByVal Value As String) 
			Me.SetString(value, TableUtils.CompanyNameColumn)
		End Set
	End Property


	''' <summary>
	''' This is a convenience method that can be used to determine that the column is set.
	''' </summary>
	Public ReadOnly Property CompanyNameSpecified() As Boolean
        Get
            Dim val As ColumnValue = Me.GetValue(TableUtils.CompanyNameColumn)
            If val Is Nothing OrElse val.IsNull Then
                Return False
            End If
            Return True
        End Get
    End Property

	''' <summary>
	''' This is a convenience method that can be used to get the default value of a column.
	''' </summary>
    Public ReadOnly Property CompanyNameDefault() As String
        Get
            Return TableUtils.CompanyNameColumn.DefaultValue
        End Get
    End Property

	''' <summary>
	''' This is a convenience property that provides direct access to the value of the record's Shippers_.Phone field.
	''' </summary>
	Public Property Phone() As String
		Get 
			Return CType(Me.GetValue(TableUtils.PhoneColumn).ToString(), String)
		End Get
		Set (ByVal Value As String) 
			Me.SetString(value, TableUtils.PhoneColumn)
		End Set
	End Property


	''' <summary>
	''' This is a convenience method that can be used to determine that the column is set.
	''' </summary>
	Public ReadOnly Property PhoneSpecified() As Boolean
        Get
            Dim val As ColumnValue = Me.GetValue(TableUtils.PhoneColumn)
            If val Is Nothing OrElse val.IsNull Then
                Return False
            End If
            Return True
        End Get
    End Property

	''' <summary>
	''' This is a convenience method that can be used to get the default value of a column.
	''' </summary>
    Public ReadOnly Property PhoneDefault() As String
        Get
            Return TableUtils.PhoneColumn.DefaultValue
        End Get
    End Property



#End Region

End Class
End Namespace
