/// <summary> /// 要通过数据判断值对象相等 /// </summary> /// <param name="obj"></param> /// <returns></returns> public override bool Equals(object obj) { var target = obj as ValueObject; if (target == null) { return(false); } var targetType = target.ObjectType; if (targetType != ObjectType) { return(false); } //对比所有领域属性 var properties = DomainProperty.GetProperties(ObjectType); foreach (var property in properties) { if (!EqualsHelper.ObjectEquals(this.GetValue(property), target.GetValue(property))) { return(false); } } return(true); }
public override bool Equals(object obj) { if (obj is MethodParameter) { var target = (MethodParameter)obj; return(EqualsHelper.ObjectEquals(this.Type, target.Type) && this.IsGeneric == target.IsGeneric); } return(false); }
public int[] FindModified(object[] old, object[] current, object entity, ISessionImplementor session) { if (!EqualsHelper.Equals(old[0], current[0])) { return(new int[] { 0 }); } else { return(null); } }
public int[] FindDirty(object[] currentState, object[] previousState, object entity, ISessionImplementor session) { if (!EqualsHelper.Equals(currentState[0], previousState[0])) { return(new int[] { 0 }); } else { return(null); } }
public override bool Equals(object obj) { if (obj is ConstructorKey) { var target = (ConstructorKey)obj; return(EqualsHelper.ObjectEquals(this.ObjectType, target.ObjectType) && this.IsGenericVersion == target.IsGenericVersion && EqualsHelper.ListEquals(this.Parameters, target.Parameters) && EqualsHelper.ListEquals(this.GenericTypes, target.GenericTypes)); } return(false); }
public Task <int[]> FindModifiedAsync(object[] old, object[] current, object entity, ISessionImplementor session, CancellationToken cancellationToken) { try { if (!EqualsHelper.Equals(old[0], current[0])) { return(Task.FromResult <int[]>(new int[] { 0 })); } else { return(Task.FromResult <int[]>(null)); } } catch (Exception ex) { return(Task.FromException <int[]>(ex)); } }
public Task <int[]> FindDirtyAsync(object[] currentState, object[] previousState, object entity, ISessionImplementor session, CancellationToken cancellationToken) { try { if (!EqualsHelper.Equals(currentState[0], previousState[0])) { return(Task.FromResult <int[]>(new int[] { 0 })); } else { return(Task.FromResult <int[]>(null)); } } catch (Exception ex) { return(Task.FromException <int[]>(ex)); } }
public virtual bool IsEqual(object x, object y) { return(EqualsHelper.Equals(x, y)); }
public override bool IsEqual(object x, object y) { return(EqualsHelper.Equals(x, y)); }
/* * (non-Javadoc) * * @see org.hibernate.usertype.UserType#equals(java.lang.Object, * java.lang.Object) */ //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public boolean equals(Object arg0, Object arg1) throws org.hibernate.HibernateException public virtual bool Equals(object arg0, object arg1) { return(EqualsHelper.Equals(arg0, arg1)); }
public virtual bool IsEqual(object x, object y, EntityMode entityMode) { return(EqualsHelper.Equals(x, y)); }