public TypeList(Net.Vpc.Upa.Impl.Persistence.QueryExecutor queryExecutor, System.Type entity, string[] fields) : base(queryExecutor) { Net.Vpc.Upa.Impl.Persistence.NativeField[] expressions = queryExecutor.GetFields(); this.fields = fields; beanType = Net.Vpc.Upa.Impl.Util.PlatformBeanTypeRepository.GetInstance().GetBeanType(entity); if (fields == null || fields.Length == 0) { System.Collections.Generic.ISet <string> fieldNames = beanType.GetPropertyNames(); this.fields = fieldNames.ToArray(); } fieldsByExpression = new string[expressions.Length]; for (int i = 0; i < fieldsByExpression.Length; i++) { Net.Vpc.Upa.Impl.Persistence.NativeField e = expressions[i]; string name = e.GetName(); foreach (string field in this.fields) { if (name.Equals(field)) { fieldsByExpression[i] = field; break; } } } columns = expressions.Length; }
public EntityBeanFactory(Net.Vpc.Upa.Entity entity, Net.Vpc.Upa.ObjectFactory objectFactory) { this.entity = entity; this.nfo = entity.GetBeanType(); this.objectFactory = objectFactory; System.Collections.Generic.IList <Net.Vpc.Upa.Field> fields = entity.GetFields(); }
public BeanAdapterRecord(object userObject, string entityName, Net.Vpc.Upa.BeanType nfo, bool ignoreUnspecified) { this.userObject = userObject; this.entityName = entityName; this.nfo = nfo; this.ignoreUnspecified = ignoreUnspecified; propertyChangeSupport = new Net.Vpc.Upa.PropertyChangeSupport(this); }
public EntityBeanType(Net.Vpc.Upa.Entity entity) { this.platformBeanType = Net.Vpc.Upa.Impl.Util.PlatformBeanTypeRepository.GetInstance().GetBeanType(entity.GetEntityType()); this.entity = entity; try { //entity.GetEntityType().GetConstructor().SetAccessible(true); } catch (System.Exception e) { throw new System.ArgumentException("Unable to resolve default constructor for type " + entity.GetEntityType() + " (entity " + entity.GetName() + ")", e); } foreach (Net.Vpc.Upa.Field field in entity.GetFields()) { GetAttrAdapter(field.GetName()); } }
public virtual Net.Vpc.Upa.BeanType GetBeanType(System.Type cls) { Net.Vpc.Upa.BeanType beanType = Net.Vpc.Upa.Impl.FwkConvertUtils.GetMapValue <System.Type, Net.Vpc.Upa.BeanType>(classBeanTypeReflectorMap, cls); if (beanType == null) { lock (classBeanTypeReflectorMap) { beanType = Net.Vpc.Upa.Impl.FwkConvertUtils.GetMapValue <System.Type, Net.Vpc.Upa.BeanType>(classBeanTypeReflectorMap, cls); if (beanType == null) { beanType = new Net.Vpc.Upa.Impl.Util.DefaultBeanType(cls); classBeanTypeReflectorMap[cls] = beanType; } } } return(beanType); }
private bool Build() { if (this.fieldNames == null) { idEntity = entity.GetPersistenceUnit().FindEntity(idType); if (idEntity != null) { isEntityKey = true; System.Collections.Generic.IList <string> fn = new System.Collections.Generic.List <string>(); // for (Field primaryField : entity.getPrimaryFields()) { // fn.add(primaryField.getName()); // } this.fieldNames = fn.ToArray(); } else { bnfo = Net.Vpc.Upa.Impl.Util.PlatformBeanTypeRepository.GetInstance().GetBeanType(idType); System.Collections.Generic.ISet <string> fn = bnfo.GetPropertyNames(); this.fieldNames = fn.ToArray(); } } return(isEntityKey); }
public CustomRecordBeanType(Net.Vpc.Upa.Entity entity, System.Type customType) : base(entity) { this.customType = Net.Vpc.Upa.Impl.Util.PlatformBeanTypeRepository.GetInstance().GetBeanType(customType); }
public KeySubclassUnstructuredFactory(Net.Vpc.Upa.BeanType nfo) { this.nfo = nfo; }
public DefaultBeanAdapter(System.Type cls) { this.beanType = Net.Vpc.Upa.Impl.Util.PlatformBeanTypeRepository.GetInstance().GetBeanType(cls); }
public BeanAdapterKey(System.Type keyType, object userObject, Net.Vpc.Upa.Entity entity) { this.keyType = keyType; this.userObject = userObject; nfo = Net.Vpc.Upa.Impl.Util.PlatformBeanTypeRepository.GetInstance().GetBeanType(keyType); }