Examples of ObjectContext


Examples of ariba.ui.meta.persistence.ObjectContext

        this.stringValue = stringValue;
    }

    public static Global find (String key)
    {
        ObjectContext context = ObjectContext.get();
        return context.findOne(Global.class, Collections.singletonMap("key", (Object)key));
    }
View Full Code Here

Examples of org.apache.abdera.ext.serializer.ObjectContext

                           SerializationContext context,
                           Conventions conventions) {

        Type type = Type.TEXT;
        Object contentValue = null;
        ObjectContext valueContext = null;
        AccessibleObject accessor = objectContext.getAccessor(Value.class, conventions);
        if (accessor != null && !(source instanceof Element)) {
            contentValue = eval(accessor, source);
            valueContext = new ObjectContext(contentValue, source, accessor);
            Text _text = valueContext.getAnnotation(Text.class);
            type = _text != null ? _text.type() : type;
        } else {
            Text _text = objectContext.getAnnotation(Text.class);
            type = _text != null ? _text.type() : type;
            contentValue = source;
            valueContext = objectContext;
        }
        QName qname = this.qname != null ? this.qname : getQName(objectContext.getAccessor());
        StreamWriter sw = context.getStreamWriter();
        sw.startText(qname, type);
        writeAttributes(source, objectContext, context, conventions);

        switch (type) {
            case TEXT:
            case HTML:
                sw.writeElementText(toString(contentValue));
                break;
            case XHTML:
                Div div = null;
                if (contentValue instanceof Div)
                    div = (Div)contentValue;
                else {
                    div = context.getAbdera().getFactory().newDiv();
                    div.setValue(toString(contentValue));
                }
                context.serialize(div, new ObjectContext(div));
                break;
        }
    }
View Full Code Here

Examples of org.apache.abdera.i18n.templates.ObjectContext

      if (param instanceof Map) {
        context = new HashMapContext(cleanMapCtx(param), true);
      } else if (param instanceof Context) {
        context = (Context)param;
      } else {
        context = new ObjectContext(param,true);
      }
    }
    return context;
  }
View Full Code Here

Examples of org.apache.cayenne.ObjectContext

        // TODO: andrus, 3/28/2006 - 'SnapshotEventDecorator' serves as a bridge (or
        // rather a noop wrapper) between old snapshot events and new GraphEvents. Once
        // SnapshotEvents are replaced with GraphEvents (in 2.0) we won't need it
        GraphDiff diff = new SnapshotEventDecorator(event);

        ObjectContext originatingContext = (event.getPostedBy() instanceof ObjectContext)
                ? (ObjectContext) event.getPostedBy()
                : null;
        context.fireDataChannelChanged(originatingContext, diff);
    }
View Full Code Here

Examples of org.apache.cayenne.ObjectContext

        Object target = doResolveFault(sourceObject, relationshipName);

        // must update the diff for the object

        ObjectContext context = sourceObject.getObjectContext();
        if ((state == PersistenceState.MODIFIED || state == PersistenceState.DELETED)
                && context instanceof DataContext) {

            ObjectDiff diff = ((DataContext) context)
                    .getObjectStore()
View Full Code Here

Examples of org.apache.cayenne.ObjectContext

    lastToString = null;
    lastToStringTime = 0;
  }

  private String getShortPrettyName() {
    ObjectContext context = DatabaseContext.getContext();
    if(context == null)
      return shortLogonName;

    String shortPrettyName = shortLogonName;
    try {
View Full Code Here

Examples of org.apache.cayenne.ObjectContext

  /**
   * Equivalent to getShortLogonName if there is no database or if the user isn't in it;
   * @return User[#N][@Realm] or [Prefix ][Account (]FullLogonName[)]
   */
  private String getPrettyName() {
    ObjectContext context = DatabaseContext.getContext();
    if(context == null)
      return shortLogonName;

    String prettyName = shortLogonName;
    try {
View Full Code Here

Examples of org.apache.cayenne.ObjectContext

  /**
   * Equivalent to getShortLogonName if there is no database or if the user isn't in it;
   * @return User[#N][@Realm] or <Account> [(FullLogonName)]
   */
  private String getAccountAndLogin() {
    ObjectContext context = DatabaseContext.getContext();
    if(context == null)
      return shortLogonName;

    String prettyName = shortLogonName;
    try {
View Full Code Here

Examples of org.apache.cayenne.ObjectContext

  /**
   * Equivalent to getShortLogonName if there is no database or if the user isn't in it;
   * @return User[#N][@Realm] or <Account>
   */
  private String getAccountOrLogin() {
    ObjectContext context = DatabaseContext.getContext();
    if(context == null)
      return shortLogonName;

    String prettyName = shortLogonName;
    try {
View Full Code Here

Examples of org.apache.cayenne.ObjectContext

  }

  public void setFlags(int flags) {
    this.flags = flags;

    ObjectContext context = DatabaseContext.getContext();
    if(context != null)
      try {
        Account account = Account.get(this);
        if(account != null)
          this.flags |= account.getFlagSpoof();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.