List<TypeDefinitionContainer> result = null;
boolean hasExtension = (extension != null) && (!extension.getExtensions().isEmpty());
boolean propDefs = (includePropertyDefinitions == null ? false : includePropertyDefinitions.booleanValue());
// get the SPI and fetch the type definitions
CmisSpi spi = CmisBindingsHelper.getSPI(session);
result = spi.getRepositoryService().getTypeDescendants(repositoryId, typeId, depth, includePropertyDefinitions,
extension);
// put it into the cache
if (!hasExtension && propDefs && (result != null)) {
TypeDefinitionCache cache = CmisBindingsHelper.getTypeDefinitionCache(session);