/// <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.intrnl.SISSubscription Load(YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey id) { YPF.Comercial.RRCC.SUP.intrnl.SISSubscription _ent = Find(id); if (_ent == null) { throw new Sybase.Persistence.ObjectNotFoundException(); } return(_ent); }
/// <summary> /// Get surroget key of the mobile business object /// </summary> public YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey _pk() { YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey _key = new YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey(); _key.Domain = (Domain); _key.Package = (Package); _key.SyncGroup = (SyncGroup); _key.ClientId = (ClientId); return(_key); }
/// <summary> /// Sybase internal use only. /// <summary> public static com.sybase.afx.json.JsonObject __toJSON(YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey _object, bool _includeBigAttribute) { if (_includeBigAttribute) { return(YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey.ToJSON(_object)); } else { return(YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey.ToJSONWithoutBigAttribute(_object)); } }
internal static com.sybase.afx.json.JsonObject ToJSON(YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey _object, bool __buildGraph, bool _includeBigAttribute, bool _includeUserAttributes) { if ((_object == null)) { return(null); } else { return(_object._toJSON(__buildGraph, _includeBigAttribute, _includeUserAttributes)); } }
internal static YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey FromJSON(object _json) { if (_json == null) { return(null); } else { YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey _obj = new YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey(); _obj._fromJSON((com.sybase.afx.json.JsonObject)_json); return(_obj); } }
/// <summary> /// override method /// </summary> public override bool Equals(object that) { YPF.Comercial.RRCC.SUP.intrnl.SISSubscription that_1 = that as YPF.Comercial.RRCC.SUP.intrnl.SISSubscription; if (that_1 == null) { return(false); } YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey id_2 = this._pk(); YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey id_3 = that_1._pk(); if ((id_2 == null) || (id_3 == null)) { return(false); } return(id_2.Equals(id_3)); }
/// <summary> /// override method /// </summary> public override int GetHashCode() { try { return(_pk().GetHashCode()); } catch (System.Exception) { YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey _key = new YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey(); _key.Domain = (Domain); _key.Package = (Package); _key.SyncGroup = (SyncGroup); _key.ClientId = (ClientId); return(_key.GetHashCode()); } }
private static YPF.Comercial.RRCC.SUP.intrnl.SISSubscription _find(YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey 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.intrnl.SISSubscription _rt = null; System.Data.IDbCommand ps = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, sql); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "domain", id.Domain); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "package", id.Package); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "syncGroup", id.SyncGroup); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "clientId", id.ClientId); _rs = ps.ExecuteReader(); Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile(); while (com.sybase.afx.db.ReaderUtil.Read(profile, _rs)) { _rt = new YPF.Comercial.RRCC.SUP.intrnl.SISSubscription(); _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(); } }
/// <summary> /// Search mobile business object using surrogateKey /// </summary> /// <param name="id">surrogateKey</param> /// <returns>mobile business object</returns> /// <remarks> </remarks> public static YPF.Comercial.RRCC.SUP.intrnl.SISSubscription Find(YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey id) { return(_find(id, "select \"device_id\",\"user_name\",\"h\",\"i\",\"admin_lock\",\"l\",\"m\",\"n\",\"domain\",\"pkg\",\"sync_group\",\"cid\" from sup_sis_subscription where \"domain\"=? and \"pkg\"=? and \"sync_group\"=? and \"cid\"=?", false, false)); }
internal static YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey FromJSON(object _json) { if (_json == null) { return null; } else { YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey _obj = new YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey(); _obj._fromJSON((com.sybase.afx.json.JsonObject)_json); return _obj; } }
internal static com.sybase.afx.json.JsonObject ToJSON(YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey _object, bool __buildGraph, bool _includeBigAttribute) { return(ToJSON(_object, __buildGraph, _includeBigAttribute, true)); }
internal static com.sybase.afx.json.JsonObject ToJSON(YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey _object) { return(YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey.ToJSON(_object, false, true, true)); }
internal static com.sybase.afx.json.JsonObject ToJSONWithoutUserAttributes(YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey _object) { return(YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey.ToJSON(_object, false, false, false)); }
/// <summary> /// Sybase internal use only. /// <summary> public static com.sybase.afx.json.JsonObject __toJSON(YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey _object) { return(YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey.ToJSON(_object)); }
/// <summary> /// override method /// </summary> public override int GetHashCode() { try { return _pk().GetHashCode(); } catch(System.Exception) { YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey _key = new YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey(); _key.Domain =(Domain); _key.Package =(Package); _key.SyncGroup =(SyncGroup); _key.ClientId =(ClientId); return _key.GetHashCode(); } }
/// <summary> /// Get surroget key of the mobile business object /// </summary> public YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey _pk() { YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey _key = new YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey(); _key.Domain =(Domain); _key.Package =(Package); _key.SyncGroup =(SyncGroup); _key.ClientId =(ClientId); return _key; }