Пример #1
0
func (this *EntityTreeTransformer) BeforeAll() coll.Collection {
	this.crawler = new(Crawler)
	this.crawler.Prepare(this.Query)

	if this.reuse {
		return coll.NewLinkedHashSet()
	}
	return coll.NewArrayList()
}
Пример #2
0
func (this *Table) GetBasicColumns() coll.Collection {
	list := coll.NewArrayList()
	for e := list.Enumerator(); e.HasNext(); {
		if column, ok := e.Next().(*Column); ok && !column.IsKey() && !column.IsVersion() && !column.IsDeletion() {
			list.Add(column)
		}
	}
	return list
}
Пример #3
0
func GetLink(chain string) *LinkNav {
	idx := strings.Index(chain, FK_NAV_SEP)
	var link Str
	if idx > 0 {
		link = Str(chain[:idx])
	} else {
		link = Str(chain)
	}
	o, _ := Tables.Get(link)
	table, _ := o.(*Table)

	if idx < 0 {
		return NewLinkNav(nil, table)
	} else if table != nil {
		foreignKeys := coll.NewArrayList()
		return table.GetLink(chain[idx+1:], foreignKeys)
	}

	return nil
}
Пример #4
0
func (this *EntityTransformer) BeforeAll() coll.Collection {
	return coll.NewArrayList()
}