当前位置: 首页>>代码示例>>Java>>正文


Java Struct.TYPE_LINKED属性代码示例

本文整理汇总了Java中lucee.runtime.type.Struct.TYPE_LINKED属性的典型用法代码示例。如果您正苦于以下问题:Java Struct.TYPE_LINKED属性的具体用法?Java Struct.TYPE_LINKED怎么用?Java Struct.TYPE_LINKED使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在lucee.runtime.type.Struct的用法示例。


在下文中一共展示了Struct.TYPE_LINKED属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: checkTableFill

private static Struct checkTableFill(DatabaseMetaData md, String dbName, String tableName) throws SQLException, PageException {
	Struct rows=new CastableStruct(tableName,Struct.TYPE_LINKED);
	ResultSet columns = md.getColumns(dbName, null, tableName, null);
	//print.o(new QueryImpl(columns,""));
	try{
		String name;
		Object nullable;
		while(columns.next()) {
			name=columns.getString("COLUMN_NAME");
			
			nullable=columns.getObject("IS_NULLABLE");
			rows.setEL(CommonUtil.createKey(name),new ColumnInfo(
					name,
					columns.getInt("DATA_TYPE"),
					columns.getString("TYPE_NAME"),
					columns.getInt("COLUMN_SIZE"),
					CommonUtil.toBooleanValue(nullable)	
			));
		}
	}
	finally {
		CommonUtil.closeEL(columns);
	}// Table susid defined for cfc susid does not exist.
	
	return rows;
}
 
开发者ID:lucee,项目名称:Lucee4,代码行数:26,代码来源:HibernateUtil.java

示例2: cfmlStartTag

private int cfmlStartTag() throws PageException {
callerScope.initialize(pageContext);
      
// thistag
if(thistagScope==null)thistagScope=new StructImpl(Struct.TYPE_LINKED);
      thistagScope.set(GENERATED_CONTENT,"");
      thistagScope.set(EXECUTION_MODE,"start");      
      thistagScope.set(EXECUTE_BODY,Boolean.TRUE);
      thistagScope.set(KeyConstants._HASENDTAG,Caster.toBoolean(hasBody));
      

ctVariablesScope=new VariablesImpl();
      ctVariablesScope.setEL(KeyConstants._ATTRIBUTES,attributesScope);
      ctVariablesScope.setEL(KeyConstants._CALLER,callerScope);
      ctVariablesScope.setEL(KeyConstants._THISTAG,thistagScope);
      
      
      // include
      doInclude();
      
      return Caster.toBooleanValue(thistagScope.get(EXECUTE_BODY))?EVAL_BODY_BUFFERED:SKIP_BODY;
  }
 
开发者ID:lucee,项目名称:Lucee,代码行数:22,代码来源:CFTag.java

示例3: init

@Override
public void init(GatewayEngine engine,String id, String cfcPath, Map config) throws GatewayException {
	this.engine=(GatewayEngineImpl) engine;
	this.id=id;
	
	//requestURI=engine.toRequestURI(cfcPath);
	Struct args=new StructImpl(Struct.TYPE_LINKED);
	args.setEL("id", id);
	args.setEL("config", Caster.toStruct(config,null,false));
	if(!StringUtil.isEmpty(cfcPath)){
		try {
			args.setEL("listener", this.engine.getComponent(cfcPath,id));
		} catch (PageException e) {
			engine.log(this,GatewayEngine.LOGLEVEL_ERROR, e.getMessage());
		}
	}
	
	try {
		callOneWay("init",args);
	} catch (PageException pe) {
		
		engine.log(this,GatewayEngine.LOGLEVEL_ERROR, pe.getMessage());
		//throw new PageGatewayException(pe);
	}
	
}
 
开发者ID:lucee,项目名称:Lucee,代码行数:26,代码来源:CFCGateway.java

示例4: call

public static Struct call(PageContext pc ,String type) throws FunctionException {
    type=type.toLowerCase();
    if(type.equals("linked")) return new StructImpl(Struct.TYPE_LINKED);
    else if(type.equals("ordered")) return new StructImpl(Struct.TYPE_LINKED);
    else if(type.equals("weak")) return new StructImpl(Struct.TYPE_WEAKED);
    else if(type.equals("syncronized")) return new StructImpl(Struct.TYPE_SYNC);
    else if(type.equals("synchronized")) return new StructImpl(Struct.TYPE_SYNC);
    else if(type.equals("sync")) return new StructImpl(Struct.TYPE_SYNC);
    else if(type.equals("soft")) return new StructImpl(StructImpl.TYPE_SOFT);
    else if(type.equals("normal")) return new StructImpl();
    
    else throw new FunctionException(pc,"structNew",1,"type","valid values are [normal, weak, linked, soft, synchronized]");
}
 
开发者ID:lucee,项目名称:Lucee4,代码行数:13,代码来源:StructNew.java

示例5: getScope

public Struct getScope(Collection.Key key) {
	Object rtn=null;
	Struct sct=new StructImpl(Struct.TYPE_LINKED);
	
	if(checkArguments) {
	    rtn=local.get(key,NullSupportHelper.NULL());
	    if(rtn!=NullSupportHelper.NULL()) sct.setEL(KeyConstants._local, rtn);
	    rtn=argument.getFunctionArgument(key,NullSupportHelper.NULL());
	    if(rtn!=NullSupportHelper.NULL()) sct.setEL(KeyConstants._arguments, rtn);
	}
			
	// get data from queries
	if(allowImplicidQueryCall && !qryStack.isEmpty()) {
		rtn=qryStack.getColumnFromACollection(key);
		if(rtn!=null) sct.setEL(KeyConstants._query, rtn);
	}
	
	// variable
	rtn=variable.get(key,NullSupportHelper.NULL());
	if(rtn!=NullSupportHelper.NULL()) {
		sct.setEL(KeyConstants._variables, rtn);
	}
	
	// thread scopes
	if(pc.hasFamily()) {
		rtn = pc.getThreadScope(key,NullSupportHelper.NULL());
		if(rtn!=NullSupportHelper.NULL()) sct.setEL(KeyConstants._thread, rtn); 
	}
	
	// get a scope value
	for(int i=0;i<scopes.length;i++) {
		rtn=scopes[i].get(key,NullSupportHelper.NULL());
		if(rtn!=NullSupportHelper.NULL()) {
			sct.setEL(KeyImpl.init(scopes[i].getTypeAsString()), rtn); 
		}
	}
	return sct;
}
 
开发者ID:lucee,项目名称:Lucee4,代码行数:38,代码来源:UndefinedImpl.java

示例6: entrySet

public static Set<Entry<String, Object>> entrySet(Struct sct) {
	boolean linked=sct instanceof StructImpl && ((StructImpl)sct).getType()==Struct.TYPE_LINKED;
	Iterator<Entry<Key, Object>> it = sct.entryIterator();
	Entry<Key, Object> e;
	Set<Entry<String, Object>> set=linked?new LinkedHashSet<Entry<String, Object>>():new HashSet<Entry<String, Object>>();
	while(it.hasNext()){
		e= it.next();
		set.add(new StructMapEntry(sct,e.getKey(),e.getValue()));
	}
	return set;
}
 
开发者ID:lucee,项目名称:Lucee4,代码行数:11,代码来源:StructUtil.java

示例7: keySet

public static Set<String> keySet(Struct sct) {
	boolean linked=sct instanceof StructImpl && ((StructImpl)sct).getType()==Struct.TYPE_LINKED;
	Iterator<Key> it = sct.keyIterator();
	Set<String> set=linked?new LinkedHashSet<String>():new HashSet<String>();
	while(it.hasNext()){
		set.add(it.next().getString());
	}
	return set;
}
 
开发者ID:lucee,项目名称:Lucee4,代码行数:9,代码来源:StructUtil.java

示例8: getType

public static int getType(MapPro m){
	if(m instanceof SyncMap)
		return ((SyncMap)m).getType();
	
	if(m instanceof LinkedHashMapPro) return Struct.TYPE_LINKED;
	if(m instanceof WeakHashMapPro) return Struct.TYPE_WEAKED;
	//if(map instanceof SyncMap) return TYPE_SYNC;
	if(m instanceof MapProWrapper) return Struct.TYPE_SOFT;
	return Struct.TYPE_REGULAR;
}
 
开发者ID:lucee,项目名称:Lucee4,代码行数:10,代码来源:StructUtil.java

示例9: cfcEndTag

private int cfcEndTag() throws PageException {
    
	boolean exeAgain = false;
    try{
 	String output=null;
 	Object rtn=Boolean.FALSE;
     
 	
 	if(cfc.contains(pageContext, ON_END_TAG)){
 		try {
      	output=bodyContent.getString();
          bodyContent.clearBody();
          //rtn=cfc.call(pageContext, ON_END_TAG, new Object[]{attributesScope,pageContext.variablesScope(),output});
          
          Struct args=new StructImpl(Struct.TYPE_LINKED);
      	args.set(KeyConstants._ATTRIBUTES, attributesScope);
      	setCaller(pageContext, args);
      	args.set(GENERATED_CONTENT, output);
      	rtn=cfc.callWithNamedValues(pageContext, ON_END_TAG, args);	
   
          
          
     	}
     	finally	{
     		writeEnclosingWriter();
     	}
     }
 	else writeEnclosingWriter();
 	
     exeAgain= Caster.toBooleanValue(rtn,false);
 }
    catch(Throwable t){
    	ExceptionUtil.rethrowIfNecessary(t);
    	isEndTag=true;
    	throw Caster.toPageException(t);
    }
    return exeAgain?EVAL_BODY_BUFFERED:SKIP_BODY;
	
}
 
开发者ID:lucee,项目名称:Lucee,代码行数:39,代码来源:CFTag.java

示例10: order

private static Key[] order(Struct sct, Key[] keys) {
	if(sct instanceof StructImpl && ((StructImpl)sct).getType()==Struct.TYPE_LINKED) return keys;
	
	TextComparator comp=new TextComparator(true,true);
	Arrays.sort(keys,comp);
	return keys;
}
 
开发者ID:lucee,项目名称:Lucee,代码行数:7,代码来源:StructUtil.java

示例11: keySet

public static Set<String> keySet(Struct sct) {
	boolean linked=sct instanceof StructSupport && ((StructSupport)sct).getType()==Struct.TYPE_LINKED;

	Iterator<Key> it = sct.keyIterator();
	Set<String> set=linked?new LinkedHashSet<String>():new HashSet<String>();
	while(it.hasNext()){
		set.add(it.next().getString());
	}
	return set;
}
 
开发者ID:lucee,项目名称:Lucee,代码行数:10,代码来源:StructUtil.java

示例12: toType

public static String toType(int type, String defaultValue){
	if(Struct.TYPE_LINKED==type) return "ordered";
	if(Struct.TYPE_WEAKED==type) return "weak";
	if(Struct.TYPE_REGULAR==type) return "regular";
	if(Struct.TYPE_REGULAR==type) return "regular";
	if(Struct.TYPE_SOFT==type) return "soft";
	if(Struct.TYPE_SYNC==type) return "synchronized";
	if(Struct.TYPE_UNDEFINED==type) return "undefined";
	
	return defaultValue;
}
 
开发者ID:lucee,项目名称:Lucee,代码行数:11,代码来源:StructUtil.java

示例13: CookieImpl

/**
 * constructor for the Cookie Scope
 */
public CookieImpl() {
	super("cookie",SCOPE_COOKIE, Struct.TYPE_LINKED);		
}
 
开发者ID:lucee,项目名称:Lucee,代码行数:6,代码来源:CookieImpl.java

示例14: URLImpl

/**
 * Standart Constructor
 */
public URLImpl() {
	super("url",SCOPE_URL, Struct.TYPE_LINKED);
}
 
开发者ID:lucee,项目名称:Lucee,代码行数:6,代码来源:URLImpl.java

示例15: getType

@Override
public int getType() {
	return Struct.TYPE_LINKED;
}
 
开发者ID:lucee,项目名称:Lucee,代码行数:4,代码来源:XMLAttributes.java


注:本文中的lucee.runtime.type.Struct.TYPE_LINKED属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。