MapAPI.getNumDBLayers

 

int getNumDBLayers()

This method returns the number of layers in the map that have a relational database table associated with them.  This will, in general, be all or a subset of the permanent layers (See Overview of Data Layering).