예제 #1
0
 /// <summary>
 /// Get the mobile business object by surrogate key.
 /// </summary>
 /// <param name="id">surrogate key</param>
 /// <returns>the mobile business object for the surroget key</returns>
 /// <exception cref="ObjectNotFoundException">Thrown if unable to retrieve mobile business object.</exception>
 /// <remarks> </remarks>
 public static YPF.Comercial.RRCC.SUP.CustomLocalData Load(string id)
 {
     YPF.Comercial.RRCC.SUP.CustomLocalData _ent = Find(id);
     if (_ent == null)
     {
         throw new Sybase.Persistence.ObjectNotFoundException();
     }
     return(_ent);
 }
예제 #2
0
 /// <summary>
 /// copy the MBO attributes to current MBO
 /// </summary>
 public void CopyAll(YPF.Comercial.RRCC.SUP.CustomLocalData entity)
 {
     this._isNew              = entity._isNew;
     this.__valorBoolean      = entity.__valorBoolean;
     this.__valorInteger      = entity.__valorInteger;
     this.__valorString       = entity.__valorString;
     this.__valorDouble       = entity.__valorDouble;
     this.__valorDateTime     = entity.__valorDateTime;
     this.__idCustomLocalData = entity.__idCustomLocalData;
 }
예제 #3
0
 /// <summary>
 /// Set current MBO attributes by specified MBO.
 /// </summary>
 public static YPF.Comercial.RRCC.SUP.CustomLocalData Merge(YPF.Comercial.RRCC.SUP.CustomLocalData entity)
 {
     YPF.Comercial.RRCC.SUP.CustomLocalData ent = Find(entity._pk());
     if (ent == null)
     {
         ent = new YPF.Comercial.RRCC.SUP.CustomLocalData();
     }
     ent.CopyAll(entity);
     ent.Save();
     return(ent);
 }
예제 #4
0
 internal static com.sybase.afx.json.JsonObject ToJSON(YPF.Comercial.RRCC.SUP.CustomLocalData _object, bool __buildGraph, bool _includeBigAttribute, bool _includeUserAttributes)
 {
     if ((_object == null))
     {
         return(null);
     }
     else
     {
         return(_object._toJSON(__buildGraph, _includeBigAttribute, _includeUserAttributes));
     }
 }
예제 #5
0
        /// <summary>
        /// Refresh the mobile business object from database.
        /// </summary>
        public void Refresh()
        {
            if (!_isNew)
            {
                YPF.Comercial.RRCC.SUP.CustomLocalData ent = Load(_pk());
                CopyAll(ent);

                _isNew   = false;
                _isDirty = false;
            }
        }
예제 #6
0
 /// <summary>
 /// Sybase internal use only.
 /// <summary>
 public static com.sybase.afx.json.JsonObject __toJSON(YPF.Comercial.RRCC.SUP.CustomLocalData _object, bool _includeBigAttribute)
 {
     if (_includeBigAttribute)
     {
         return(YPF.Comercial.RRCC.SUP.CustomLocalData.ToJSON(_object));
     }
     else
     {
         return(YPF.Comercial.RRCC.SUP.CustomLocalData.ToJSONWithoutBigAttribute(_object));
     }
 }
예제 #7
0
 internal static YPF.Comercial.RRCC.SUP.CustomLocalData FromJSON(object _json)
 {
     if (_json == null)
     {
         return(null);
     }
     else
     {
         YPF.Comercial.RRCC.SUP.CustomLocalData _obj = new YPF.Comercial.RRCC.SUP.CustomLocalData();
         _obj._fromJSON((com.sybase.afx.json.JsonObject)_json);
         return(_obj);
     }
 }
예제 #8
0
        /// <summary>
        /// override method
        /// </summary>
        public override bool Equals(object that)
        {
            YPF.Comercial.RRCC.SUP.CustomLocalData that_1 = that as YPF.Comercial.RRCC.SUP.CustomLocalData;
            if (that_1 == null)
            {
                return(false);
            }
            string id_2 = this._pk();
            string id_3 = that_1._pk();

            if ((id_2 == null) || (id_3 == null))
            {
                return(false);
            }
            return(id_2.Equals(id_3));
        }
예제 #9
0
        /// <summary>
        /// Find a List of CustomLocalData
        /// </summary>
        /// <param name="query">The query to be filter.</param>
        /// <exception cref="PersistenceException">Thrown if unable to retrieve mobile business object.</exception>
        /// <remarks> </remarks>
        public static Sybase.Collections.GenericList <YPF.Comercial.RRCC.SUP.CustomLocalData> FindWithQuery(Sybase.Persistence.Query query)
        {
            Sybase.Persistence.ConnectionWrapper _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBReadConnection();
            try
            {
                query.SetEntity(META_DATA);
                query.SetDatabaseMetaData(YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.Metadata);
                int count_2 = 0;
                Sybase.Collections.GenericList <YPF.Comercial.RRCC.SUP.CustomLocalData> list_3 = new Sybase.Collections.GenericList <YPF.Comercial.RRCC.SUP.CustomLocalData>();
                if (query.Take == 0)
                {
                    return(list_3);
                }
                com.sybase.afx.db.DynamicQuery       query_4 = new com.sybase.afx.db.DynamicQuery();
                System.Data.IDbCommand               ps_5    = query_4.CreateCommand(_conn, query);
                System.Data.IDataReader              rs_6    = ps_5.ExecuteReader();
                Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile();
                while (com.sybase.afx.db.ReaderUtil.Read(profile, rs_6))
                {
                    YPF.Comercial.RRCC.SUP.CustomLocalData entity_9 = new YPF.Comercial.RRCC.SUP.CustomLocalData();
                    entity_9.Bind(profile, rs_6);
                    list_3.Add(entity_9);
                    count_2++;
                }
                if (rs_6 != null)
                {
                    com.sybase.afx.db.ReaderUtil.Close(profile, rs_6, count_2);
                }
                if (ps_5 != null)
                {
                    ps_5.Dispose();
                }

                return(list_3);
            }
            catch (Sybase.Persistence.PersistenceException ex_10)
            {
                throw ex_10;
            }
            finally
            {
                YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection();
            }
        }
예제 #10
0
        /// <summary>
        /// Find a List of YPF.Comercial.RRCC.SUP.CustomLocalData
        /// </summary>
        /// <exception cref="PersistentException">Thrown if unable to retrieve mobile business object.</exception>
        /// <remarks> </remarks>
        public static Sybase.Collections.GenericList <YPF.Comercial.RRCC.SUP.CustomLocalData> FindAll(int skip, int take)
        {
            skip = skip + 1;
            Sybase.Collections.GenericList <YPF.Comercial.RRCC.SUP.CustomLocalData> result_2 = new Sybase.Collections.GenericList <YPF.Comercial.RRCC.SUP.CustomLocalData>();
            System.Data.IDataReader rs_4 = null;
            int count_5 = 0;

            Sybase.Persistence.ConnectionWrapper _conn = null;
            try
            {
                _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBReadConnection();
                string _selectSQL = " x.\"b\",x.\"c\",x.\"d\",x.\"e\",x.\"f\",x.\"a\" FROM \"co_crmmobiledesa_1_0_customlocaldata\" x";
                _selectSQL = "select top " + take + " start at " + skip + " " + _selectSQL;
                System.Data.IDbCommand ps_3 = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, _selectSQL);
                rs_4 = ps_3.ExecuteReader();
                Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile();
                while (com.sybase.afx.db.ReaderUtil.Read(profile, rs_4))
                {
                    YPF.Comercial.RRCC.SUP.CustomLocalData entity_6 = new YPF.Comercial.RRCC.SUP.CustomLocalData();
                    entity_6.Bind(profile, rs_4);
                    count_5++;
                    result_2.Add(entity_6);
                }
                if (rs_4 != null)
                {
                    com.sybase.afx.db.ReaderUtil.Close(profile, rs_4, count_5);
                }
                if (ps_3 != null)
                {
                    ps_3.Dispose();
                }
                _selectSQL = null;
            }
            catch (System.Data.DataException ex)
            {
                throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex);
            }
            finally
            {
                YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection();
            }
            return(result_2);
        }
예제 #11
0
        /// <summary>
        /// Find a mobile business object YPF.Comercial.RRCC.SUP.CustomLocalData
        /// </summary>
        /// <exception cref="PersistentException">Thrown if unable to retrieve mobile business object.</exception>
        /// <remarks> </remarks>
        public static YPF.Comercial.RRCC.SUP.CustomLocalData FindByPrimaryKey(string idCustomLocalData)
        {
            YPF.Comercial.RRCC.SUP.CustomLocalData result_2 = null;
            System.Data.IDataReader rs_4 = null;
            int count_5 = 0;

            Sybase.Persistence.ConnectionWrapper _conn = null;
            try
            {
                _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBReadConnection();
                string _selectSQL           = "SELECT x.\"b\",x.\"c\",x.\"d\",x.\"e\",x.\"f\",x.\"a\" FROM \"co_crmmobiledesa_1_0_customlocaldata\" x WHERE x.\"a\" = ?";
                System.Data.IDbCommand ps_3 = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, _selectSQL);
                com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps_3, "idCustomLocalData", idCustomLocalData);
                rs_4 = ps_3.ExecuteReader();
                Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile();
                while (com.sybase.afx.db.ReaderUtil.Read(profile, rs_4))
                {
                    YPF.Comercial.RRCC.SUP.CustomLocalData entity_6 = new YPF.Comercial.RRCC.SUP.CustomLocalData();
                    entity_6.Bind(profile, rs_4);
                    count_5++;
                    result_2 = entity_6;
                }
                if (rs_4 != null)
                {
                    com.sybase.afx.db.ReaderUtil.Close(profile, rs_4, count_5);
                }
                if (ps_3 != null)
                {
                    ps_3.Dispose();
                }
                _selectSQL = null;
            }
            catch (System.Data.DataException ex)
            {
                throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex);
            }
            finally
            {
                YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection();
            }
            return(result_2);
        }
예제 #12
0
        private static YPF.Comercial.RRCC.SUP.CustomLocalData _find(string id, String sql, bool findOs, bool findNonPending)
        {
            Sybase.Persistence.ConnectionWrapper _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBReadConnection();
            System.Data.IDataReader _rs = null;
            int count = 0;

            try
            {
                YPF.Comercial.RRCC.SUP.CustomLocalData _rt = null;
                System.Data.IDbCommand ps = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, sql);
                com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "idCustomLocalData", id);
                _rs = ps.ExecuteReader();
                Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile();
                while (com.sybase.afx.db.ReaderUtil.Read(profile, _rs))
                {
                    _rt = new YPF.Comercial.RRCC.SUP.CustomLocalData();
                    _rt.Bind(profile, _rs);
                    count++;
                }
                if (_rs != null)
                {
                    com.sybase.afx.db.ReaderUtil.Close(profile, _rs, count);
                }
                if (ps != null)
                {
                    ps.Dispose();
                }
                return(_rt);
            }
            catch (System.Data.DataException ex)
            {
                throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex);
            }
            finally
            {
                YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection();
            }
        }
예제 #13
0
 /// <summary>
 /// Sybase internal use only.
 /// <summary>
 public static com.sybase.afx.json.JsonObject __toJSON(YPF.Comercial.RRCC.SUP.CustomLocalData _object)
 {
     return(YPF.Comercial.RRCC.SUP.CustomLocalData.ToJSON(_object));
 }
예제 #14
0
 internal static YPF.Comercial.RRCC.SUP.CustomLocalData FromJSON(object _json)
 {
     if (_json == null)
     {
         return null;
     }
     else
     {
         YPF.Comercial.RRCC.SUP.CustomLocalData _obj = new YPF.Comercial.RRCC.SUP.CustomLocalData();
         _obj._fromJSON((com.sybase.afx.json.JsonObject)_json);
         return _obj;
     }
 }
예제 #15
0
 internal static com.sybase.afx.json.JsonObject ToJSON(YPF.Comercial.RRCC.SUP.CustomLocalData _object, bool __buildGraph, bool _includeBigAttribute)
 {
     return(ToJSON(_object, __buildGraph, _includeBigAttribute, true));
 }
예제 #16
0
 /// <summary>
 /// Set current MBO attributes by specified MBO.
 /// </summary>
 public static YPF.Comercial.RRCC.SUP.CustomLocalData Merge(YPF.Comercial.RRCC.SUP.CustomLocalData entity)
 {
     YPF.Comercial.RRCC.SUP.CustomLocalData ent = Find(entity._pk());
     if (ent == null)
     {
         ent = new YPF.Comercial.RRCC.SUP.CustomLocalData();
     }
     ent.CopyAll(entity);
     ent.Save();
     return ent;
 }
예제 #17
0
 /// <summary>
 /// Find a List of CustomLocalData
 /// </summary>
 /// <param name="query">The query to be filter.</param>
 /// <exception cref="PersistenceException">Thrown if unable to retrieve mobile business object.</exception>
 /// <remarks> </remarks>
 public static Sybase.Collections.GenericList<YPF.Comercial.RRCC.SUP.CustomLocalData> FindWithQuery(Sybase.Persistence.Query query)
 {
     Sybase.Persistence.ConnectionWrapper _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBReadConnection();
     try
     {
         query.SetEntity(META_DATA);
         query.SetDatabaseMetaData(YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.Metadata);
         int count_2 = 0;
             Sybase.Collections.GenericList<YPF.Comercial.RRCC.SUP.CustomLocalData> list_3 = new Sybase.Collections.GenericList<YPF.Comercial.RRCC.SUP.CustomLocalData>();
             if(query.Take == 0)
             {
                 return list_3;
             }
             com.sybase.afx.db.DynamicQuery query_4 = new com.sybase.afx.db.DynamicQuery();
             System.Data.IDbCommand ps_5 = query_4.CreateCommand(_conn, query);
             System.Data.IDataReader rs_6 = ps_5.ExecuteReader();
             Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile();
             while (com.sybase.afx.db.ReaderUtil.Read(profile, rs_6))
             {
                 YPF.Comercial.RRCC.SUP.CustomLocalData entity_9 = new YPF.Comercial.RRCC.SUP.CustomLocalData();
                 entity_9.Bind(profile, rs_6);
                 list_3.Add(entity_9);
                 count_2++;
             }
             if (rs_6 != null) com.sybase.afx.db.ReaderUtil.Close(profile, rs_6, count_2);
             if (ps_5 != null) ps_5.Dispose();
             
             return list_3;
     }    
     catch (Sybase.Persistence.PersistenceException ex_10)
     {
         throw ex_10;
     }
     finally
     {
         YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection();
     }
 }
예제 #18
0
 /// <summary>
 /// Find a List of YPF.Comercial.RRCC.SUP.CustomLocalData
 /// </summary>
 /// <exception cref="PersistentException">Thrown if unable to retrieve mobile business object.</exception>
 /// <remarks> </remarks>
 public static Sybase.Collections.GenericList<YPF.Comercial.RRCC.SUP.CustomLocalData> FindAll(int skip, int take)
 {
         skip = skip + 1;
     Sybase.Collections.GenericList<YPF.Comercial.RRCC.SUP.CustomLocalData> result_2 = new Sybase.Collections.GenericList<YPF.Comercial.RRCC.SUP.CustomLocalData>();
     System.Data.IDataReader rs_4 = null;
     int count_5 = 0;
     Sybase.Persistence.ConnectionWrapper _conn = null;
     try
     {
         _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBReadConnection();
         string _selectSQL = " x.\"b\",x.\"c\",x.\"d\",x.\"e\",x.\"f\",x.\"a\" FROM \"co_crmmobiledesa_1_0_customlocaldata\" x";
         _selectSQL = "select top " + take + " start at " + skip + " " + _selectSQL;
         System.Data.IDbCommand ps_3 = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, _selectSQL);
         rs_4 = ps_3.ExecuteReader();
         Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile();
         while (com.sybase.afx.db.ReaderUtil.Read(profile, rs_4))
         {       
             YPF.Comercial.RRCC.SUP.CustomLocalData entity_6 = new YPF.Comercial.RRCC.SUP.CustomLocalData();
             entity_6.Bind(profile, rs_4);
             count_5++;
             result_2.Add(entity_6);
         }
         if (rs_4 != null) com.sybase.afx.db.ReaderUtil.Close(profile, rs_4, count_5);
         if (ps_3 != null) ps_3.Dispose();
         _selectSQL = null;
     }
     catch (System.Data.DataException ex)
     {
         throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex);
     }
     finally
     {
         YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection();
     } 
     return result_2; 
   
 }
예제 #19
0
 internal static com.sybase.afx.json.JsonObject ToJSONWithoutUserAttributes(YPF.Comercial.RRCC.SUP.CustomLocalData _object)
 {
     return(YPF.Comercial.RRCC.SUP.CustomLocalData.ToJSON(_object, false, false, false));
 }
예제 #20
0
 internal static com.sybase.afx.json.JsonObject ToJSON(YPF.Comercial.RRCC.SUP.CustomLocalData _object)
 {
     return(YPF.Comercial.RRCC.SUP.CustomLocalData.ToJSON(_object, false, true, true));
 }
예제 #21
0
 private void CreateBySQL(Sybase.Persistence.ConnectionWrapper _conn, string sql, YPF.Comercial.RRCC.SUP.CustomLocalData __theObject)
 {
     System.Data.IDbCommand ps = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, sql);
     com.sybase.afx.db.CommandUtil.SetNullableBoolean(_conn.GetConnectionProfile(), ps, "valorBoolean", __theObject.ValorBoolean);
     com.sybase.afx.db.CommandUtil.SetNullableInt(_conn.GetConnectionProfile(), ps, "valorInteger", __theObject.ValorInteger);
     com.sybase.afx.db.CommandUtil.SetNullableString(_conn.GetConnectionProfile(), ps, "valorString", __theObject.ValorString);
     com.sybase.afx.db.CommandUtil.SetNullableDouble(_conn.GetConnectionProfile(), ps, "valorDouble", __theObject.ValorDouble);
     com.sybase.afx.db.CommandUtil.SetNullableDateTime(_conn.GetConnectionProfile(), ps, "valorDateTime", __theObject.ValorDateTime);
     com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "idCustomLocalData", __theObject.IdCustomLocalData);
     ps.ExecuteNonQuery();
     ps.Dispose();;
 }
예제 #22
0
 private static YPF.Comercial.RRCC.SUP.CustomLocalData _find(string id, String sql, bool findOs, bool findNonPending)
 {
     Sybase.Persistence.ConnectionWrapper _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBReadConnection();
     System.Data.IDataReader _rs = null;
     int count = 0;
     try
     {
         YPF.Comercial.RRCC.SUP.CustomLocalData _rt = null;
         System.Data.IDbCommand ps = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, sql);
         com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "idCustomLocalData", id);
         _rs = ps.ExecuteReader();
         Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile();
         while (com.sybase.afx.db.ReaderUtil.Read(profile, _rs))
         {
             _rt = new YPF.Comercial.RRCC.SUP.CustomLocalData();
             _rt.Bind(profile, _rs);
             count++;
         }
         if (_rs != null) com.sybase.afx.db.ReaderUtil.Close(profile, _rs, count);
         if (ps != null) ps.Dispose();
         return _rt;
     }
     catch(System.Data.DataException ex)
     {
         throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex);
     }
     finally
     {
         YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection();
     }
 }
예제 #23
0
 /// <summary>
 /// Find a mobile business object YPF.Comercial.RRCC.SUP.CustomLocalData
 /// </summary>
 /// <exception cref="PersistentException">Thrown if unable to retrieve mobile business object.</exception>
 /// <remarks> </remarks>
 public static YPF.Comercial.RRCC.SUP.CustomLocalData FindByPrimaryKey(string idCustomLocalData)
 {
     YPF.Comercial.RRCC.SUP.CustomLocalData result_2 = null;
     System.Data.IDataReader rs_4 = null;
     int count_5 = 0;
     Sybase.Persistence.ConnectionWrapper _conn = null;
     try
     {
         _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBReadConnection();
         string _selectSQL = "SELECT x.\"b\",x.\"c\",x.\"d\",x.\"e\",x.\"f\",x.\"a\" FROM \"co_crmmobiledesa_1_0_customlocaldata\" x WHERE x.\"a\" = ?";
         System.Data.IDbCommand ps_3 = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, _selectSQL);
         com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps_3, "idCustomLocalData", idCustomLocalData);
         rs_4 = ps_3.ExecuteReader();
         Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile();
         while (com.sybase.afx.db.ReaderUtil.Read(profile, rs_4))
         {       
             YPF.Comercial.RRCC.SUP.CustomLocalData entity_6 = new YPF.Comercial.RRCC.SUP.CustomLocalData();
             entity_6.Bind(profile, rs_4);
             count_5++;
             result_2 = entity_6;
         }
         if (rs_4 != null) com.sybase.afx.db.ReaderUtil.Close(profile, rs_4, count_5);
         if (ps_3 != null) ps_3.Dispose();
         _selectSQL = null;
     }
     catch (System.Data.DataException ex)
     {
         throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex);
     }
     finally
     {
         YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection();
     } 
     return result_2; 
   
 }