Searching Intrinsic Properties in .NET

I won’t waste your time with any introductory drivel — if you want that, you can read the other post. Let’s get right into the code.

Plumtree.Remote.PRC.Search.IntrinsicPortalField.cs:

using System;
using com.plumtree.remote.prc.search.xp;
using com.plumtree.remote.prc.search;

namespace Plumtree.Remote.PRC.Search
{
 public class IntrinsicPortalField : Field
 {
  private IntrinsicPortalField(IntrinsicXPPortalField xpField) : base(xpField)
  {
   ;
  }

  public static readonly IntrinsicPortalField EMAIL_ADDRESS = new
   IntrinsicPortalField(IntrinsicXPPortalField.forID(26));
 }
}

com.plumtree.remote.prc.search.xp.IntrinsicXPPortalField.cs:

using System;

namespace com.plumtree.remote.prc.search.xp
{
 public class IntrinsicXPPortalField : XPField
 {
  private IntrinsicXPPortalField(String name, bool isSearchable, bool isRetrievable) :
   base(name, isSearchable, isRetrievable)
  {
   ;
  }

  public static IntrinsicXPPortalField forID(int propertyId)
  {
   return new IntrinsicXPPortalField("ptportal.propertyid." + propertyId, true, true);
  }
 }
}

Enjoy!

Leave a Reply