convert a list of dao into this format
@param daoList
@return
@throws DAOArrayException
165297
public DAOArray fromDao(DAO[] daoList) throws DAOArrayException{
		for(DAO dao : daoList){
			add(dao);
		}
		return this;
	}
684513
public static void unregisterDaos(ConnectionSource connectionSource) {
		// TODO when ormlite-core version > 5.1 is released, replace with:
		// "DaoManager.unregisterDaos(connectionSource);"
		// See https://github.com/j256/ormlite-core/pull/149
		unregisterDao(connectionSource, Contents.class,
				SpatialReferenceSystem.class,
				SpatialReferenceSystemSfSql.class,
				SpatialReferenceSystemSqlMm.class, Extensions.class,
				GriddedCoverage.class, GriddedTile.class, GeometryIndex.class,
				TableIndex.class, FeatureTileLink.class,
				ExtendedRelation.class, TileScaling.class,
				GeometryColumns.class, GeometryColumnsSfSql.class,
				GeometryColumnsSqlMm.class, Metadata.class,
				MetadataReference.class, DataColumns.class,
				DataColumnConstraints.class, TileMatrix.class,
				TileMatrixSet.class, ContentsId.class);
	}
689193
private String extractDaoFieldNameForInternalDataSource(SQLiteDaoDefinition dao) {
		return "_" + CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_CAMEL, dao.getName());
	}
1037005
@Bean(name = "requestAttributeMergingDao")
    @Qualifier("uPortalInternal")
    public IPersonAttributeDao getRequestAttributeMergingDao() {
        final MergingPersonAttributeDaoImpl rslt = new MergingPersonAttributeDaoImpl();
        rslt.setUsernameAttributeProvider(getUsernameAttributeProvider());
        rslt.setMerger(new ReplacingAttributeAdder());
        final List<IPersonAttributeDao> daos = new ArrayList<>();
        daos.add(getRequestAttributesDao());
        daos.add(getCachingPersonAttributeDao());
        rslt.setPersonAttributeDaos(daos);
        return rslt;
    }
893536
private static List<byte[]> makeDOAs(final List<byte[]> l)
	{
		for (int i = 0; i < l.size(); ++i) {
			final byte[] pdu = l.get(i);
			l.set(i, Arrays.copyOfRange(pdu, 2, pdu.length));
		}
		return l;
	}
1229960
private List makeDOAs(List l)
	{
		for (int i = 0; i < l.size(); ++i) {
			final byte[] pdu = (byte[]) l.get(i);
			if (pdu.length == 4)
				l.set(i, new byte[] { pdu[2], pdu[3] });
			else if (pdu.length == 8)
				l.set(i, new byte[] { pdu[2], pdu[3], pdu[4], pdu[5], pdu[6], pdu[7] });
		}
		return l;
	}
214771
@Override
	public void correctDataTypes(DAO[] daoList, ModelDef model) {
		for(DAO dao : daoList){
			correctDataTypes(dao, model);
		}
	}
90973
public synchronized Token[] toArray(Transaction transaction)
                    throws ObjectManagerException
    {
        // Throws ArrayIndexOutOfBoundsException if size is larger than Integer.MAX_VALUE,
        // because i++ will wrap and go negative.
        Token[] tokens = new Token[(int) size(transaction)];
        int i = 0;
        try {
            for (Iterator iterator = iterator();; tokens[i++] = (Token) iterator.next(transaction));
        } catch (java.util.NoSuchElementException exception) {
            // No FFDC code needed.
            // We have run off the end of the collection.
        } // try.
        return tokens;
    }
978290
protected <L, S extends Persistable<L>>
    S _daoLoadOrCreate(
                    final Class<S> type,
                    final S object
                    )
    {
        CastorDao<L, S>  dao = getForwardingDao( type );
        S  p_object = dao._loadCorrespondent( object );
        if (p_object == null) {
            dao._create( object );
        }

        return p_object;
    }
1241569
public <T> GenericMultiBoJdbcDao addDelegateDao(Class<T> clazz, IGenericBoDao<T> dao) {
        delegateDaos.put(clazz, dao);
        return this;
    }
674012
private ContentsDao getContentsDao() throws SQLException {
		if (contentsDao == null) {
			contentsDao = DaoManager
					.createDao(connectionSource, Contents.class);
		}
		return contentsDao;
	}
319997
public static M2MEntity extractEntityManagedByDAO(TypeElement daoElement) {
		ClassName entity1 = null;
		ClassName entity2 = null;
		String prefixId = null;
		String tableName = null;
		String entityName = null;
		PackageElement pkg = null;
		String packageName = null;
		boolean needToCreate = true;
		boolean generatedMethods=true;
		boolean immutable=true;
		
		
		if (daoElement.getAnnotation(BindDaoMany2Many.class) != null) {
			entity1 = TypeUtility.className(AnnotationUtility.extractAsClassName(daoElement, BindDaoMany2Many.class, AnnotationAttributeType.ENTITY_1));
			entity2 = TypeUtility.className(AnnotationUtility.extractAsClassName(daoElement, BindDaoMany2Many.class, AnnotationAttributeType.ENTITY_2));
			prefixId = AnnotationUtility.extractAsString(daoElement, BindDaoMany2Many.class, AnnotationAttributeType.ID_NAME);
			tableName = AnnotationUtility.extractAsString(daoElement, BindDaoMany2Many.class, AnnotationAttributeType.TABLE_NAME);
			tableName = AnnotationUtility.extractAsString(daoElement, BindDaoMany2Many.class, AnnotationAttributeType.TABLE_NAME);
			immutable = AnnotationUtility.extractAsBoolean(daoElement, BindDaoMany2Many.class, AnnotationAttributeType.IMMUTABLE);
			
			generatedMethods=AnnotationUtility.extractAsBoolean(daoElement, BindDaoMany2Many.class, AnnotationAttributeType.METHODS);
			
			entityName = entity1.simpleName() + entity2.simpleName();
			pkg = BaseProcessor.elementUtils.getPackageOf(daoElement);
			packageName = pkg.isUnnamed() ? null : pkg.getQualifiedName().toString();
		}

		if (daoElement.getAnnotation(BindDao.class) != null) {
			// we have @BindDao
			String derived = AnnotationUtility.extractAsClassName(daoElement, BindDao.class, AnnotationAttributeType.VALUE);
			ClassName clazz = TypeUtility.className(derived);

			packageName = clazz.packageName();
			entityName = clazz.simpleName();

			String tableTemp = AnnotationUtility.extractAsClassName(daoElement, BindDao.class, AnnotationAttributeType.TABLE_NAME);
			if (StringUtils.hasText(tableTemp)) {
				tableName = tableTemp;
			}

			needToCreate = false;
		}

		M2MEntity entity = new M2MEntity(daoElement, packageName, entityName, TypeUtility.className(daoElement.asType().toString()), entity1, entity2, prefixId, tableName, needToCreate, generatedMethods, immutable);

		return entity;
	}
318468
public static Object extractWriteArray(final DeviceAttribute da, final AttrWriteType writeType,
	    final AttrDataFormat format) throws DevFailed {
	if (da == null) {
	    throw DevFailedUtils.newDevFailed(ERROR_MSG_DA);
	}
	return InsertExtractFactory.getAttributeExtractor(da.getType()).extractWriteArray(da, writeType, format);
    }
210110
def format_platforms(cls, platforms):
        ''''''
        lines = []
        if platforms:
            lines.append('This DAP is only supported on the following platforms:')
            lines.extend([' * ' + platform for platform in platforms])
        return lines
72523
private <T> List<T> parseArray(JSONArray items, Class<T> clazz) {

        List<T> result = new ArrayList<T>();
        for (Object onode : items) {
            JSONObject jnode = (JSONObject) onode;

            T item;
            try {
                item = clazz.getDeclaredConstructor(JSONObject.class, DGraph.class).newInstance(jnode, this);
            } catch (InstantiationException | 
                    IllegalAccessException | 
                    IllegalArgumentException | 
                    InvocationTargetException | 
                    NoSuchMethodException | 
                    SecurityException e) {
                throw new AamWriterException(e);
            }

            result.add(item);
        }
        return result;
    }
171873
private List<?> convertDataToList(final Object data) {
		if (data == null) {
			return null;
		} else if (data instanceof List) {
			return (List<?>) data;
		} else if (data instanceof Object[]) {
			return Arrays.asList((Object[]) data);
		} else {
			return Arrays.asList(new Object[]{data});
		}
	}
447481
public static <T, ID> RuntimeExceptionDao<T, ID> createDao(ConnectionSource connectionSource, Class<T> clazz)
			throws SQLException {
		@SuppressWarnings("unchecked")
		Dao<T, ID> castDao = (Dao<T, ID>) DaoManager.createDao(connectionSource, clazz);
		return new RuntimeExceptionDao<T, ID>(castDao);
	}