本文整理汇总了C#中NeoDatis.GetName方法的典型用法代码示例。如果您正苦于以下问题:C# NeoDatis.GetName方法的具体用法?C# NeoDatis.GetName怎么用?C# NeoDatis.GetName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NeoDatis
的用法示例。
在下文中一共展示了NeoDatis.GetName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Match
public bool Match(NeoDatis.Odb.Test.VO.Human.Animal @object)
{
return @object.GetName().StartsWith("my ");
}
示例2: Match
public virtual bool Match(NeoDatis.Odb.Test.VO.School.Student @object)
{
return @object.GetName().Equals(name);
}
示例3: Match
public bool Match(NeoDatis.Odb.Test.VO.Login.Function function)
{
return function.GetName().Equals("function 5");
}
示例4: ComputeKey
/// <summary>Take the fields of the index and take value from the query</summary>
/// <param name="ci">The class info involved</param>
/// <param name="index">The index</param>
/// <param name="query"></param>
/// <returns>The key of the index</returns>
public static NeoDatis.Tool.Wrappers.OdbComparable ComputeKey(NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo
ci, NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfoIndex index, NeoDatis.Odb.Impl.Core.Query.Criteria.CriteriaQuery
query)
{
string[] attributesNames = ci.GetAttributeNames(index.GetAttributeIds());
NeoDatis.Odb.Core.Layers.Layer2.Meta.AttributeValuesMap values = query.GetCriteria
().GetValues();
return BuildIndexKey(index.GetName(), values, attributesNames);
}
示例5: WriteClassAttributeInfo
/// <summary>Writes a class attribute info, an attribute of a class</summary>
/// <param name="cai"></param>
/// <param name="writeInTransaction"></param>
/// <></>
private void WriteClassAttributeInfo(NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassAttributeInfo
cai, bool writeInTransaction)
{
fsi.WriteInt(cai.GetId(), writeInTransaction, "attribute id");
fsi.WriteBoolean(cai.IsNative(), writeInTransaction);
if (cai.IsNative())
{
fsi.WriteInt(cai.GetAttributeType().GetId(), writeInTransaction, "att odb type id"
);
if (cai.GetAttributeType().IsArray())
{
fsi.WriteInt(cai.GetAttributeType().GetSubType().GetId(), writeInTransaction, "att array sub type"
);
// when the attribute is not native, then write its class info
// position
if (cai.GetAttributeType().GetSubType().IsNonNative())
{
fsi.WriteLong(storageEngine.GetSession(true).GetMetaModel().GetClassInfo(cai.GetAttributeType
().GetSubType().GetName(), true).GetId().GetObjectId(), writeInTransaction, "class info id of array subtype"
, NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction.DataWriteAction);
}
}
// For enum, we write the class info id of the enum class
if (cai.GetAttributeType().IsEnum())
{
fsi.WriteLong(storageEngine.GetSession(true).GetMetaModel().GetClassInfo(cai.GetFullClassname
(), true).GetId().GetObjectId(), writeInTransaction, "class info id", NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction
.DataWriteAction);
}
}
else
{
fsi.WriteLong(storageEngine.GetSession(true).GetMetaModel().GetClassInfo(cai.GetFullClassname
(), true).GetId().GetObjectId(), writeInTransaction, "class info id", NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction
.DataWriteAction);
}
fsi.WriteString(cai.GetName(), false, writeInTransaction);
fsi.WriteBoolean(cai.IsIndex(), writeInTransaction);
}
示例6: Get
public static NeoDatis.Odb.Core.Query.Criteria.ICriterion Get(string attributeName
, NeoDatis.Odb.Core.Query.Criteria.Operator @operator, string value)
{
if (@operator == NeoDatis.Odb.Core.Query.Criteria.Operator.Equal)
{
return new NeoDatis.Odb.Impl.Core.Query.Criteria.EqualCriterion(attributeName, value
);
}
if (@operator == NeoDatis.Odb.Core.Query.Criteria.Operator.Like)
{
return new NeoDatis.Odb.Impl.Core.Query.Criteria.LikeCriterion(attributeName, value
, true);
}
if (@operator == NeoDatis.Odb.Core.Query.Criteria.Operator.GreaterOrEqual)
{
return new NeoDatis.Odb.Core.Query.Criteria.ComparisonCriterion(attributeName, value
, NeoDatis.Odb.Core.Query.Criteria.ComparisonCriterion.ComparisonTypeGe);
}
if (@operator == NeoDatis.Odb.Core.Query.Criteria.Operator.GreaterThan)
{
return new NeoDatis.Odb.Core.Query.Criteria.ComparisonCriterion(attributeName, value
, NeoDatis.Odb.Core.Query.Criteria.ComparisonCriterion.ComparisonTypeGt);
}
if (@operator == NeoDatis.Odb.Core.Query.Criteria.Operator.LessThan)
{
return new NeoDatis.Odb.Core.Query.Criteria.ComparisonCriterion(attributeName, value
, NeoDatis.Odb.Core.Query.Criteria.ComparisonCriterion.ComparisonTypeLt);
}
if (@operator == NeoDatis.Odb.Core.Query.Criteria.Operator.LessOrEqual)
{
return new NeoDatis.Odb.Core.Query.Criteria.ComparisonCriterion(attributeName, value
, NeoDatis.Odb.Core.Query.Criteria.ComparisonCriterion.ComparisonTypeLe);
}
if (@operator == NeoDatis.Odb.Core.Query.Criteria.Operator.Contain)
{
return new NeoDatis.Odb.Impl.Core.Query.Criteria.ContainsCriterion(attributeName,
value);
}
throw new NeoDatis.Odb.ODBRuntimeException(NeoDatis.Odb.Core.NeoDatisError.QueryUnknownOperator
.AddParameter(@operator.GetName()));
}