Ejemplo n.º 1
0
 /// <summary>
 /// Get the aliased columns of the owning entity which are to 
 /// be used in the join
 /// </summary>
 public static string[] GetAliasedLHSColumnNames(
     IAssociationType type,
     string alias,
     int property,
     int begin,
     IOuterJoinLoadable lhsPersister,
     IMapping mapping
     )
 {
     if (type.UseLHSPrimaryKey)
     {
         return StringHelper.Qualify(alias, lhsPersister.IdentifierColumnNames);
     }
     else
     {
         string propertyName = type.LHSPropertyName;
         if (propertyName == null)
         {
             return ArrayHelper.Slice(
                 lhsPersister.ToColumns(alias, property),
                 begin,
                 type.GetColumnSpan(mapping)
                 );
         }
         else
         {
             return ((IPropertyMapping) lhsPersister).ToColumns(alias, propertyName); //bad cast
         }
     }
 }
Ejemplo n.º 2
0
 public string[] GetAliasedColumnNames(IAssociationType type, int begin)
 {
     if (type.UseLHSPrimaryKey)
     {
         return(StringHelper.Qualify(Alias, Persister.IdentifierColumnNames));
     }
     else
     {
         string propertyName = type.LHSPropertyName;
         if (propertyName == null)
         {
             return(ArrayHelper.Slice(GetAliasedColumns(), begin, type.GetColumnSpan(Mapping)));
         }
         else
         {
             return(((IPropertyMapping)Persister).ToColumns(Alias, propertyName));                    //bad cast
         }
     }
 }
Ejemplo n.º 3
0
		public string[] GetAliasedColumnNames(IAssociationType type, int begin)
		{
			if (type.UseLHSPrimaryKey)
			{
				return StringHelper.Qualify(Alias, Persister.IdentifierColumnNames);
			}
			else
			{
				string propertyName = type.LHSPropertyName;
				if (propertyName == null)
				{
					return ArrayHelper.Slice(GetAliasedColumns(), begin, type.GetColumnSpan(Mapping));
				}
				else
				{
					return ((IPropertyMapping)Persister).ToColumns(Alias, propertyName); //bad cast
				}
			}
		}
Ejemplo n.º 4
0
 public string[] GetColumnNames(IAssociationType type, int begin)
 {
     if (type.UseLHSPrimaryKey)
     {
         return(Persister.IdentifierColumnNames);
     }
     else
     {
         string propertyName = type.LHSPropertyName;
         if (propertyName == null)
         {
             //slice, to get the columns for this component property
             return(ArrayHelper.Slice(GetColumns(), begin, type.GetColumnSpan(Mapping)));
         }
         else
         {
             //property-refs for associations defined on a
             //component are not supported, so no need to slice
             return(Persister.GetPropertyColumnNames(propertyName));
         }
     }
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Get the columns of the owning entity which are to 
 /// be used in the join
 /// </summary>
 public static string[] GetLHSColumnNames(
     IAssociationType type,
     int property,
     int begin,
     IOuterJoinLoadable lhsPersister,
     IMapping mapping
     )
 {
     if (type.UseLHSPrimaryKey)
     {
         //return lhsPersister.getSubclassPropertyColumnNames(property);
         return lhsPersister.IdentifierColumnNames;
     }
     else
     {
         string propertyName = type.LHSPropertyName;
         if (propertyName == null)
         {
             //slice, to get the columns for this component
             //property
             return ArrayHelper.Slice(
                 lhsPersister.GetSubclassPropertyColumnNames(property),
                 begin,
                 type.GetColumnSpan(mapping)
                 );
         }
         else
         {
             //property-refs for associations defined on a
             //component are not supported, so no need to slice
             return lhsPersister.GetPropertyColumnNames(propertyName);
         }
     }
 }
Ejemplo n.º 6
0
		public string[] GetColumnNames(IAssociationType type, int begin)
		{
			if (type.UseLHSPrimaryKey)
			{
				return Persister.IdentifierColumnNames;
			}
			else
			{
				string propertyName = type.LHSPropertyName;
				if (propertyName == null)
				{
					//slice, to get the columns for this component property
					return ArrayHelper.Slice(GetColumns(), begin, type.GetColumnSpan(Mapping));
				}
				else
				{
					//property-refs for associations defined on a
					//component are not supported, so no need to slice
					return Persister.GetPropertyColumnNames(propertyName);
				}
			}
		}