internal void InitConfiguration(string name) { Config4Class containingClassConfig = _containingClass.Config(); if (containingClassConfig == null) { return; } _config = containingClassConfig.ConfigField(name); }
private void AssociateYapClass(Transaction a_trans, object a_object) { if (a_object == null) { } else { //It seems that we need not result the following field //i_object = null; //i_comparator = Null.INSTANCE; //i_classMetadata = null; // FIXME: Setting the YapClass to null will prevent index use // If the field is typed we can guess the right one with the // following line. However this does break some SODA test cases. // Revisit! // if(i_field != null){ // i_classMetadata = i_field.getYapClass(); // } _classMetadata = a_trans.Container().ProduceClassMetadata(a_trans.Reflector().ForObject (a_object)); if (_classMetadata != null) { i_object = _classMetadata.GetComparableObject(a_object); if (a_object != i_object) { i_attributeProvider = _classMetadata.Config().QueryAttributeProvider(); _classMetadata = a_trans.Container().ProduceClassMetadata(a_trans.Reflector().ForObject (i_object)); } if (_classMetadata != null) { _classMetadata.CollectConstraints(a_trans, this, i_object, new _IVisitor4_84(this )); } else { AssociateYapClass(a_trans, null); } } else { AssociateYapClass(a_trans, null); } } }
private void AssociateYapClass(Transaction a_trans, object a_object) { if (a_object == null) { } else { //It seems that we need not result the following field //i_object = null; //i_comparator = Null.INSTANCE; //i_classMetadata = null; // FIXME: Setting the YapClass to null will prevent index use // If the field is typed we can guess the right one with the // following line. However this does break some SODA test cases. // Revisit! // if(i_field != null){ // i_classMetadata = i_field.getYapClass(); // } _classMetadata = a_trans.Container().ProduceClassMetadata(a_trans.Reflector().ForObject (a_object)); if (_classMetadata != null) { i_object = _classMetadata.GetComparableObject(a_object); if (a_object != i_object) { i_attributeProvider = _classMetadata.Config().QueryAttributeProvider(); _classMetadata = a_trans.Container().ProduceClassMetadata(a_trans.Reflector().ForObject (i_object)); } if (_classMetadata != null) { _classMetadata.CollectConstraints(a_trans, this, i_object, new _IVisitor4_84(this )); } else { AssociateYapClass(a_trans, null); } } else { AssociateYapClass(a_trans, null); } } }